R/Plot.R
zoom_lon_lat.RdThis function is applied by plot_lon_lat() to set the zoom based on 0 or more arguments and the actual data to be plotted. Providing no arguments returns the full extent of the data.
zoom_lon_lat(
trackData,
stationData = NULL,
lon_name = "lon",
lat_name = "lat",
lon_name_end = NULL,
lat_name_end = NULL,
lon_name_station = "lon",
lat_name_station = "lat",
xmin = NA,
xmax = NA,
ymin = NA,
ymax = NA,
zoom = 1,
zoomCenter = c(0.5, 0.5)
)A data.table with track data, including the longitude and latitude variables specified by the arguments lon_name and lat_name.
A data.table with track data, including the longitude and latitude variables specified by the arguments lon_name_station and lat_name_station.
Character: The name of the longitude and latitude variable in the data trackData.
Character: The name of the end point of the longitude and latitude variable in the data trackData, used in the case that trackType contains "s" (segments).
Character: The name of the longitude and latitude variable in the data stationData.
Numeric: The optional extremes of the plot, where x is longitude and y is latitude. Setting only xmin sets only the lower longitude limit, etc.
Numeric: The zoom of the plot, where 1 is no zoom and 2 zooms out to double extent of the plot, etc.
Numeric: The center of the plot relative to the limits of the plot before zooming.