trajPlot: Creates a map and pie chart of the trajectories of the...

View source: R/trajPlot.R

trajPlotR Documentation

Creates a map and pie chart of the trajectories of the category of interest.

Description

Creates a map and pie chart of the trajectories of the category of interest.

Usage

trajPlot(
  input,
  pltunit = "m",
  dataEpsg = 32632,
  categoryName = "marsh's",
  scalePos = "bottomleft",
  narrowPos = "topright",
  narrowSize = 1,
  xAxis = "Longitude (m)",
  yAxis = "Latitude (m)",
  axisText = 1.2,
  axisLabel = 1.4,
  plotTitle = 1.5,
  legendTex = 0.9
)

Arguments

input

is the results from running the "trajData" function.

pltunit

is the unit in which the current map is plotted in, one of cm, m, km, in, ft, mi. or lat or lon.

dataEpsg

is the projection of the current map. If extents are valid lat and lons, the projection is assumed to be lat and lon (EPSG:4326), or Spherical Mercator otherwise.

categoryName

is a character representing the name of the category of interest.Default is "marsh".

scalePos

where to align the scale bar. One of "bottomleft", "bottomright", "topleft", or "topright".

narrowPos

is a numeric value indicating the size of the north arrow.

narrowSize

is a numeric value indicating the size of the north arrow.

xAxis

is a character indicating label for the horizontal axis. default is "Longitude (m)".

yAxis

is a character indicating label for the vertical axis. default is "Latitude (m)".

axisText

is a numeric value controlling the size of the text on the horizontal and vertical ticks.

axisLabel

is a numeric value controlling the size of the horizontal and vertical labels

plotTitle

is a numeric value controlling the size of the plot title.

legendTex

is a numerical value controlling the size of the legend text.

Value

The output from trajPlot

Examples

example_data <- terra::rast(system.file("external/Example_raster_Y.tif",package="binaryTimeSeries"))
no_data <- 2
cat_interest <- 1
data_res <- c(1000,1000)
data_prj <- "+proj=utm +zone=32 +datum=WGS84 +ellps=GRS80  +units=m +no_defs"
unified_resp <- "yes"
trajdt_output <- trajData(x = example_data,nodata = no_data,
category = cat_interest,spres = data_res,datacrs = data_prj,unified = unified_resp)
trjplt_output <- trajPlot(input = trajdt_output)


binaryTimeSeries documentation built on July 18, 2022, 5:07 p.m.