Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

RomanKyrychenko/ggplot2latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggplot2latex

Codecov test coverage R-CMD-check

ggplot2latex is an R package designed to efficiently save ggplot2 plots in LaTeX TikZ format. The package provides functions to optimize the resulting .tex files by rounding coordinates, removing duplicated elements, and reducing the file size. This ensures that the LaTeX documents are both lightweight and maintain high-quality visualizations.

Features

  • Save ggplot2 plots as LaTeX (TikZ) files.
  • Optimize .tex files by rounding coordinates.
  • Remove duplicated elements to reduce file size.
  • Utilities to handle special characters in LaTeX.

Installation

To install the package, use the following command in R:

# Install from CRAN (if available)
install.packages("ggplot2latex")

# Or install from GitHub
devtools::install_github("RomanKyrychenko/ggplot2latex")

Usage

Here is an example of how to use the save_tex function to save a ggplot2 plot as a LaTeX (TikZ) file:

library(ggplot2)
library(ggplot2latex)

# Create a ggplot2 plot
ggplot_object <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()

# Save the plot as a LaTeX (TikZ) file
save_tex(ggplot_object, "path/to/file.tex")

License

This package is licensed under the MIT License.

About

R package designed to efficiently save ggplot2 plots in LaTeX TikZ format

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages