PlotSpec is the S7 class that vplot() creates and the mark_*() /
scale_*() functions extend. It is a plain, inspectable, serializable data
object: data, a list of layers, a list of scale overrides, and the page size.
Nothing is drawn until it is compiled with vellum::as_vellum_scene() (e.g.
via render_plot()). Printing it draws the plot; inspect its structure with
summary().
Arguments
- data
The data frame.
- edge_data
For a graph plot (from
vgraph()), the edge table; the default data formark_edges().NULLfor ordinary plots.- layers
A list of layer specifications (one per
mark_*()).- scales
A list of declared scale overrides.
- facet
A faceting specification (from
facet_wrap()/facet_grid()), orNULLfor a single panel.- coord
A coordinate specification (from
coord_cartesian()/coord_flip()/coord_fixed()), orNULLfor the default Cartesian system.- resolve
A named list mapping an aesthetic to
"shared"or"independent"(the scale-resolution lattice; seeresolve_scale()).- width, height
Page size in inches.
- dpi
Output resolution in dots per inch (pixels per inch). The exported PNG's pixel dimensions are
width * dpibyheight * dpi.- theme
A theme (a named list of resolved element/setting overrides, from
theme()/ atheme_*()preset), orNULLfor the default theme.- labels
A named list of plot/axis/legend label overrides (see
labs()).- marginal
A marginal-distribution specification (from
add_marginal()), orNULLfor no marginals.
