Adapter for the ggplot2 plotting system. This adapter wraps the existing ggplot2 functionality to work with the new extensible architecture.
An R6 class inheriting from SystemAdapter
maidr::SystemAdapter -> Ggplot2Adapter
new()Ggplot2Adapter$new()
can_handle()Ggplot2Adapter$can_handle(plot_object)plot_objectThe plot object to check
TRUE if this adapter can handle the object, FALSE otherwise Detect the type of a single layer
detect_layer_type()Ggplot2Adapter$detect_layer_type(layer, plot_object)layerThe ggplot2 layer object to analyze
plot_objectThe parent plot object (for context)
String indicating the layer type (e.g., "bar", "line", "point") Create an orchestrator for this system (ggplot2)
create_orchestrator()Ggplot2Adapter$create_orchestrator(plot_object)plot_objectThe ggplot2 plot object to process
PlotOrchestrator instance Get the system name
get_system_name()Ggplot2Adapter$get_system_name()System name string Get a reference to this adapter (for use by orchestrator)
get_adapter()Ggplot2Adapter$get_adapter()Self reference Check if plot has facets
has_facets()Ggplot2Adapter$has_facets(plot_object)plot_objectThe ggplot2 plot object
TRUE if plot has facets, FALSE otherwise Check if plot is a patchwork plot
is_patchwork()Ggplot2Adapter$is_patchwork(plot_object)plot_objectThe ggplot2 plot object
TRUE if plot is patchwork, FALSE otherwise
clone()The objects of this class are cloneable with this method.
Ggplot2Adapter$clone(deep = FALSE)deepWhether to make a deep clone.