Skip to main content Module theme Copy item path Source pub use elements::ElementGeom ;pub use elements::ElementLine ;pub use elements::ElementRect ;pub use elements::ElementText ;elements presets Margin Plot margins (in pixels). Theme Complete theme specification for a plot. ThemeUpdate Incremental theme modifications. All fields are optional — only Some values are applied.
Like R’s theme(axis.text.x = element_text(...)). AxisLabelFit How an outer x-axis tick label that would cross the SVG’s edge is
handled (B3-1; ggplot2 itself leaves this to the viewport/device and has
no direct equivalent — this is a ggplot-rs extension, D4). AxisSide A side of the panel an axis can sit on (#413’s per-side elements). LegendCorner A panel corner for an inside legend
(GGPlot::legend_inside_auto_with ). LegendDirection Layout direction of the legend keys (R’s legend.direction). LegendPosition Position of the legend. TagPosition Corner for the labs(tag) label (R’s plot.tag.position). TitlePosition Whether title/subtitle/caption align to the panel or the whole plot width
(R’s plot.title.position / plot.caption.position). theme_sub_axis_x ggplot2 4.0’s theme_sub_axis_x(text =, title =, line =, ticks =) (#413):
a ThemeUpdate for the x axis’s elements only. theme_sub_axis_y ggplot2 4.0’s theme_sub_axis_y() — see theme_sub_axis_x . theme_sub_legend ggplot2 4.0’s theme_sub_legend(title =, text =, background =, position =) (#413). theme_sub_panel ggplot2 4.0’s theme_sub_panel(background =, border =, grid.major =, grid.minor =) (#413). theme_sub_plot ggplot2 4.0’s theme_sub_plot(title =, subtitle =, caption =, background =, margin =) (#413). theme_sub_strip ggplot2 4.0’s theme_sub_strip(text =, background =) (#413).