Learn R Programming

maidr (version 0.1.2)

Ggplot2PointLayerProcessor: Point Layer Processor

Description

Processes scatter plot layers (geom_point) to extract point data and generate selectors for individual points in the SVG structure.

Arguments

Super class

maidr::LayerProcessor -> Ggplot2PointLayerProcessor

Methods

Inherited methods


Method process()

Usage

Ggplot2PointLayerProcessor$process(
  plot,
  layout,
  built = NULL,
  gt = NULL,
  scale_mapping = NULL,
  grob_id = NULL,
  panel_id = NULL,
  panel_ctx = NULL
)

Arguments

plot

The ggplot2 object

layout

Layout information

built

Built plot data (optional)

gt

Gtable object (optional)

scale_mapping

Scale mapping for faceted plots (optional)

grob_id

Grob ID for faceted plots (optional)

panel_id

Panel ID for faceted plots (optional)

Returns

List with data and selectors Extract axis labels from the plot


Method extract_axes_labels()

Usage

Ggplot2PointLayerProcessor$extract_axes_labels(plot, built = NULL)

Arguments

plot

The ggplot2 object

built

Built plot data (optional)

Returns

List with x and y axis labels Extract data from point layer


Method extract_data()

Usage

Ggplot2PointLayerProcessor$extract_data(
  plot,
  built = NULL,
  scale_mapping = NULL,
  panel_id = NULL
)

Arguments

plot

The ggplot2 object

built

Built plot data (optional)

scale_mapping

Scale mapping for faceted plots (optional)

panel_id

Panel ID for faceted plots (optional)

Returns

List with points array and color information Generate selectors for point elements


Method generate_selectors()

Usage

Ggplot2PointLayerProcessor$generate_selectors(
  plot,
  gt = NULL,
  grob_id = NULL,
  panel_ctx = NULL
)

Arguments

plot

The ggplot2 object

gt

Gtable object (optional)

grob_id

Grob ID for faceted plots (optional)

Returns

List of selectors Find the main panel grob


Method find_panel_grob()

Usage

Ggplot2PointLayerProcessor$find_panel_grob(gt)

Arguments

gt

The gtable to search

Returns

The panel grob or NULL Find children by type pattern


Method find_children_by_type()

Usage

Ggplot2PointLayerProcessor$find_children_by_type(grob, type_pattern)

Arguments

grob

The grob to search

type_pattern

Pattern to match

Returns

List of matching children


Method clone()

The objects of this class are cloneable with this method.

Usage

Ggplot2PointLayerProcessor$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.