plot.snowprofileSet: Plot a single layer property in multiple profiles...

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.snowprofileSet.R

Description

A flexible function to plot multiple snowprofiles either in a timeseries or various types of groups

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S3 method for class 'snowprofileSet'
plot(
  x,
  SortMethod = "time",
  ColParam = "gtype",
  TopDown = FALSE,
  DateStart = NA,
  DateEnd = NA,
  ylim = NULL,
  OutlineLyrs = FALSE,
  HorizGrid = TRUE,
  main = NA,
  ylab = NA,
  xlab = NA,
  box = TRUE,
  labelOriginalIndices = FALSE,
  yPadding = 10,
  xPadding = 0.5,
  ...
)

Arguments

x

An object of class snowprofileSet

SortMethod

How to arrange profiles along the x-axis. Options include timeseries (default = 'time'), in existing order of Profiles list ('unsorted'), sorted by HS ('hs'), or elevation ('elev')

ColParam

What parameter to show with colour. So far the following types are available: graintype (default), hardness, temperature, density, grainsize.

TopDown

Option to plot by depth instead of height with zero depth on top of plot (default = FALSE)

DateStart

Start date for timeseries plots (SortMethod = 'time'). If not provided, the function takes the date range from Profiles (default = NA).

DateEnd

End date for timeseries plots (SortMethod = 'time'). If not provided, the function takes the date range from Profiles (default = NA).

ylim

Vertical range of plot

OutlineLyrs

Switch for outlining layers (default = FALSE)

HorizGrid

Draw horizontal grid at layer heights (default = TRUE)

main

Main title

ylab

y-axis label; disable ylab by providing an empty string (i.e., ylab = ”)

xlab

x-axis label; disable xlab by providing an empty string (i.e., xlab = ”)

box

Draw a box around the plot (default = TRUE)

labelOriginalIndices

Label the original (i.e. prior to sorting) indices of the profiles at the x-axis? (default = FALSE)

yPadding

Padding between ylim and limits of data, default = 10. Note that R will still put padding by default. If you want to prohibit that entirely, specify xaxs ='i', or yaxs = 'i'.

xPadding

Padding between xlim and limits of data, default = 0.5. Note that R will still put padding by default. If you want to prohibit that entirely, specify xaxs = 'i', or yaxs = 'i'.

...

Additional parameters passed to plot()

Author(s)

shorton, fherla, phaegeli

See Also

plot.snowprofile, SPgroup

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Standard profile timeline (e.g. https://niviz.org)
plot(SPtimeline)

## Group of profiles with same timestamp
plot(SPgroup, SortMethod = 'unsorted')  # sorted in same order as list
plot(SPgroup, SortMethod = 'hs') # sorted by snow height
plot(SPgroup, SortMethod = 'elev') # sorted by elevation

## Colour layers by other properties
plot(SPtimeline, ColParam = 'density')

## Align layers by depth instead of height
plot(SPtimeline, TopDown = TRUE)

## Timelines with specific date ranges
plot(SPtimeline, DateEnd = '2017-12-17')
plot(SPtimeline, DateStart = '2017-12-15', DateEnd = '2017-12-17')

## Additional examples of plot dimensions and labelling
## Label the indices of the profiles in the list:
plot(SPgroup, SortMethod = 'elev', labelOriginalIndices = TRUE)
##  ... and with minimized axis limits:
plot(SPgroup, SortMethod = 'elev', labelOriginalIndices = TRUE,
       yPadding = 0, xPadding = 0, xaxs = 'i', yaxs = 'i')
##  sorted by depth, and without box:
plot(SPgroup, SortMethod = 'hs', TopDown = TRUE, box = FALSE)

sarp.snowprofile documentation built on July 25, 2020, 5:06 p.m.