Plots are static-first: render(p) and printing produce a static SVG
image. Adding interact() with + opts the plot into the interactive
HTML/canvas target — render(p) then produces the interactive page
instead (an explicit render(p, target = ) always wins).
TRUE (default) shows the mapped x/y values on hover;
FALSE disables the tooltip; a character vector of column names (e.g.
tooltip = c("model", "hwy")) shows those columns from the layer data
instead.
Enable scroll-to-zoom and double-click-to-reset.
Enable brush-to-zoom: drag a rectangle on the plot to zoom to it (double-click still resets).
An Interact spec to add to a plot with +.
p <- ggnext(cars, aes(speed, dist)) + geom_point()
render(p) # static SVG
#> <ggnext static render: 7,304 characters>
#> Use render(p, file = ...) to save it, or cat(x) to see the source.
pi <- p + interact() # same plot, interactive by default
html <- render(pi) # HTML/canvas with tooltip + zoom + brush