save_plotmap: Save a plot map created with 'driveplot()' as a standalone...

View source: R/save_plotmap.R

save_plotmapR Documentation

Save a plot map created with driveplot() as a standalone HTML file

Description

Save a plot map created with driveplot() as a standalone HTML file

Usage

save_plotmap(plotmap, filepath)

Arguments

plotmap

The plot map to be saved.

filepath

The path for the HTML file to be created, e.g., "myplotmap.html".

Value

The file path (invisibly).

Examples

## Not run: 
library(crosstalk)
data(drive7)
shared_drive <- SharedData$new(drive7)

myplotmap <- driveplot(
  shareddata = shared_drive,
  x = time_cst,
  ys = c(speed_mph, gyro_heading, gps_heading),
  colorvar = gyro_heading,
  maplabel = time_cst,
  colorpalette = "viridis",
  fillopacity = 1,
  xlabel = "Time",
  ylabels = c(
    "Speed (mph)", "Gyro Heading (degrees)",
    "GPS Heading (degrees)"
  ),
  showlegend = TRUE,
  legendtitle = "Gyro Heading",
  plottitle = "A drive with points colored by gyro heading",
  height = "500px"
)
save_plotmap(plotmap = myplotmap, filepath = "myplotmap.html")

## End(Not run)

DrivePlotR documentation built on Nov. 22, 2026, 5:06 p.m.