ggsave.latex: Saves a ggplot graphic to a file and creates the code to...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ggsave-latex.R

Description

Saves a ggplot graphic to a file and creates the code to include it in a LaTeX document.

Usage

1
2
3
4
  ggsave.latex(..., caption = NULL, label = NULL,
    figure.placement = "hbt", floating = TRUE,
    caption.placement = "bottom",
    latex.environments = "center")

Arguments

...

arguments passed to the ggsave function (ggsave)

caption

The caption. Default to NULL, indicating no caption.

label

The label. Default to NULL, indicating no label.

figure.placement

The placement of the figure. Default to "hbt".

floating

Logical. Indicates if the figure should be placed in a floating environment. Default to TRUE

caption.placement

Should the caption be on top or bottom of the figure. Default to "bottom"

latex.environments

Alignment of the figure. Default to "center".

Value

The graphic will be saved to a plot and the relevant LaTeX code is printed.

Author(s)

Thierry Onkelinx Thierry.Onkelinx@inbo.be, Paul Quataert

See Also

ggsave

Examples

1
2
3
4
5
require(ggplot2)
 data(cars)
	p <- ggplot(cars, aes(x = speed, y = dist)) + geom_point()
	ggsave.latex(p, filename = "test.pdf", label = "fig:Cars",
   caption = "A demo plot", height = 5, width = 4)

AFLP documentation built on May 2, 2019, 6:13 p.m.