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

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