plotDensityByDimensionValue: Plot Density for a Chosen Dimension Value

Description Usage Arguments Examples

View source: R/animateHTMLBy.R

Description

Plot Density for a Chosen Dimension Value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plotDensityByDimensionValue(
  starsObj,
  attr,
  dim,
  value,
  title,
  sf = NULL,
  baseline = NULL,
  ylim = c(0, 0.5),
  xlim = NULL,
  sd = TRUE
)

Arguments

starsObj

a stars object

attr

attribute of interest

dim

dimension of choice

value

dimension value by which to plot

title

title of plot

sf

if not null, an sf object (e.g., a country from the rnaturalearth package) that will be plotted as an inset on the graph

baseline

a vector of two dimension values that will provide a baseline density curve on the graph within the specified range.

ylim

if specified, the range of y values for the density curve (by default, 0-0.5)

xlim

if specified, the range of the x axis

sd

how should the x axis range be determined programmatically? if TRUE (the default), the x axis range is within three standard deviations of the attribute, if FALSE the range is the minimum and maximum of the attribute.

Examples

1
plotDensityByDimensionValue(GISTEMP, 1, 3, 1980, "Australia", sf = rnaturalearth::ne_countries(country = "Australia", returnclass = "sf"))

JamesMCollier/densityviz documentation built on Dec. 18, 2021, 12:31 a.m.