Learn R Programming

plotcli (version 0.2.0)

register_geom: Register a Geom Handler

Description

Register a function that can render a specific ggplot2 geom to a canvas.

Usage

register_geom(geom_name, handler)

Arguments

geom_name

Name of the geom (e.g., "GeomPoint", "GeomLine")

handler

Function that takes (data, canvas, scales, params) and draws to canvas

Examples

Run this code
register_geom("GeomPoint", function(data, canvas, scales, params) {
  # Draw points on canvas
})

Run the code above in your browser using DataLab