export_latex_code: Export the figure environment LaTeX code for a ggplot2 graph...

View source: R/export_latex_code.R

export_latex_codeR Documentation

Export the figure environment LaTeX code for a ggplot2 graph object.

Description

Export the figure environment LaTeX code for a ggplot2 graph object.

Usage

export_latex_code(
  p = ggplot2::last_plot(),
  chart_path = "atlas/chart.pdf",
  export_type = "wholecolumn"
)

Arguments

p

The ggplot2 graph object to be saved. Defaults to last_plot(), which will save the last plot that was displayed in your session.

chart_path

The chart_path and export_type will be extracted and used in the \includegraphics call.

export_type

The chart_path and export_type will be extracted and used in the \includegraphics call.

Value

LaTeX code to create a figure environment


grattan/grattantheme documentation built on June 28, 2023, 1:50 p.m.