Title: Plot ForestGEO Data
Version: 1.1.11
Description: To help you access, transform, analyze, and visualize ForestGEO data, we developed a collection of R packages (https://forestgeo.github.io/fgeo/). This package, in particular, helps you to plot ForestGEO data. To learn more about ForestGEO visit https://forestgeo.si.edu/.
License: GPL-3
URL: https://github.com/forestgeo/fgeo.plot, https://forestgeo.github.io/fgeo.plot/
BugReports: https://github.com/forestgeo/fgeo.plot/issues
Depends: R (≥ 3.3)
Imports: dplyr (≥ 0.8.0.1), fgeo.tool (≥ 1.2.4), ggplot2 (≥ 3.1.1), ggrepel (≥ 0.8.1), glue (≥ 1.3.1), magrittr (≥ 1.5), purrr (≥ 0.3.2), rlang (≥ 0.3.4), stats, stringr (≥ 1.4.0)
Suggests: covr (≥ 3.2.1), fgeo.analyze (≥ 1.1.10), fgeo.x (≥ 1.1.3), gridExtra (≥ 2.3), knitr (≥ 1.22), rmarkdown (≥ 1.12), spelling (≥ 2.1), testthat (≥ 2.1.1)
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.2.1
NeedsCompilation: no
Packaged: 2022-09-03 17:48:06 UTC; rstudio
Author: Mauro Lepore ORCID iD [aut, ctr, cre], CTFS-ForestGEO [cph, fnd]
Maintainer: Mauro Lepore <maurolepore@gmail.com>
Repository: CRAN
Date/Publication: 2022-09-03 18:30:02 UTC

fgeo.plot: Plot ForestGEO Data

Description

To help you access, transform, analyze, and visualize ForestGEO data, we developed a collection of R packages (https://forestgeo.github.io/fgeo/). This package, in particular, helps you to plot ForestGEO data. To learn more about ForestGEO visit https://forestgeo.si.edu/.

Author(s)

Maintainer: Mauro Lepore maurolepore@gmail.com (ORCID) [contractor]

Other contributors:

See Also

Useful links:


Pipe operator

Description

See magrittr::%>% for details.

Usage

lhs %>% rhs

Plot habitats.

Description

Plot habitats.

Usage

## S3 method for class 'fgeo_habitat'
autoplot(object, ...)

Arguments

object

An object of class "fgeo_habitat" (see fgeo_habitat at https://forestgeo.github.io/fgeo/articles/siteonly/reference.html).

...

Not used (included for compatibility across methods).

Value

An object of class "ggplot".

See Also

Other plot functions: autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp_elev(), sp()

Other autoplots: autoplot.sp_elev(), elev(), sp_elev(), sp()

Examples

assert_is_installed("fgeo.x")
habitats <- fgeo.x::habitat
autoplot(habitats)

Plot species distribution and/or topography.

Description

Plot the columns sp and/or elev of ForestGEO-like datasets of class 'sp' and/or 'sp_elev'.

    object <- sp(DATA-WITH-VARIABLE-sp)
    object <- elev(DATA-WITH-VARIABLE-elev)
    object <- sp_elev(DATA-WITH-VARIABLE-sp, DATA-WITH-VARIABLE-elev)

See Examples below.

Usage

## S3 method for class 'sp_elev'
autoplot(
  object,
  fill = "sp",
  hide_fill_legend = FALSE,
  shape = 21,
  point_size = 3,
  facet = TRUE,
  contour_size = 0.5,
  low = "blue",
  high = "red",
  hide_color_legend = FALSE,
  bins = NULL,
  add_elevation_labels = TRUE,
  label_size = 3,
  label_color = "grey",
  xyjust = 1,
  fontface = "italic",
  xlim = NULL,
  ylim = NULL,
  custom_theme = NULL,
  ...
)

## S3 method for class 'sp'
autoplot(
  object,
  fill = "sp",
  hide_fill_legend = FALSE,
  shape = 21,
  point_size = 3,
  facet = TRUE,
  xlim = NULL,
  ylim = NULL,
  custom_theme = NULL,
  ...
)

## S3 method for class 'elev'
autoplot(
  object,
  contour_size = 0.5,
  low = "blue",
  high = "red",
  hide_color_legend = FALSE,
  bins = NULL,
  add_elevation_labels = TRUE,
  label_size = 3,
  label_color = "grey",
  xyjust = 1,
  fontface = "italic",
  xlim = NULL,
  ylim = NULL,
  custom_theme = NULL,
  ...
)

Arguments

object

An object created with sp(), elev(), or sp_elev().

fill

Character; either a color or "sp", which maps each species to a different color.

hide_fill_legend

Logical; TRUE hides the fill legend.

shape

A number giving point shape (as in graphics::points()). Passed to ggplot2::geom_point().

point_size

A number giving point size. Passed to ggplot2::geom_point().

facet

Logical; TRUE wraps multiple panels within the area of a single graphic plot.

contour_size

A number giving the size of the contour of elevation lines. Passed to ggplot2::stat_contour() (see ggplot2::geom_contour()).

low, high

A string giving a color of the elevation lines representing low and high elevation.

hide_color_legend

Logical; TRUE hides the color legend.

bins

A number giving the number of elevation lines to plot.

add_elevation_labels

Logical; FALSE hides elevation labels.

label_size, label_color, fontface

A number (label_size) or character string (label_color and fontface) giving the size, colour and fontface of the text labels for the elevation lines.

xyjust

A number to adjust the position of the text labels of the elevation lines.

xlim, ylim

A vector of length 2, for example c(0, 500), giving the minimum and maximum limits of the vertical and horizontal coordinates.

custom_theme

A valid ggplot2::theme(). NULL uses the default theme theme_default().

...

Not used (included for compatibility across methods).

Details

⁠autoplot(sp_elev(DATA-WITH-VARIABLE-sp)⁠ (without elevation data) is equivalent to autoplot(sp(DATA-WITH-VARIABLE-sp)).

fgeo.plot wraps some functions from the ggplot2 package. For more control you can use ggplot2 directly.

Value

A "ggplot".

See Also

Other plot functions: autoplot.fgeo_habitat(), autoplot_by_species.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp_elev(), sp()

Other autoplots: autoplot.fgeo_habitat(), elev(), sp_elev(), sp()

Other functions to plot elevation: autoplot_by_species.sp_elev(), elev(), sp_elev()

Other functions to plot species: autoplot_by_species.sp_elev(), sp_elev(), sp()

Examples

assert_is_installed("fgeo.x")

# Species ---------------------------------------------------------------

# Small dataset with a few species for quick examples
census <- fgeo.x::tree5 %>%
  subset(sp %in% c("PREMON", "CASARB"))

autoplot(sp(census))

# Skip R CMD check for speed

# Customize
autoplot(sp(census), point_size = 1)

# Elevation -------------------------------------------------------------

elevation <- fgeo.x::elevation
autoplot(elev(elevation))

# Skip R CMD check for speed
# Same as `autoplot(elev(elevation))`
autoplot(elev(elevation$col))

# Customize
autoplot(elev(elevation), contour_size = 1)

# Species and elevation -------------------------------------------------
autoplot(sp_elev(census, elevation), facet = FALSE, point_size = 1)


Generic function to create a list of autoplots by species.

Description

autoplot_by_species uses ggplot2 to create a list of plots by species for an object of a particular class in a single command. It extends the S3 generic defined by ggplot2::autoplot().

Usage

autoplot_by_species(object, ...)

Arguments

object

An object of supported S3 class.

...

Other arguments passed to specific methods.

Value

A list of objects of class "ggplot".

See Also

ggplot2::autoplot().


List plots of species distribution and topography (good for pdf output).

Description

These functions extend autoplot.sp() and autoplot.elev() and return not a single plot but a list of plots. They are particularly useful if you want to print a .pdf file with one plot per page. They automatically plot the variables sp and elev of a ForestGEO-like dataset of class 'sp' or 'sp_elev'.

    object <- sp(DATA-WITH-VARIABLE-sp)
    object <- sp_elev(DATA-WITH-VARIABLE-sp, DATA-WITH-VARIABLE-elev)

See sections Usage and Examples.

Usage

## S3 method for class 'sp_elev'
autoplot_by_species(
  object,
  species = "all",
  fill = "black",
  shape = 21,
  point_size = 3,
  contour_size = 0.5,
  low = "blue",
  high = "red",
  hide_color_legend = FALSE,
  bins = NULL,
  add_elevation_labels = TRUE,
  label_size = 3,
  label_color = "grey",
  xyjust = 1,
  fontface = "italic",
  xlim = NULL,
  ylim = NULL,
  custom_theme = NULL,
  ...
)

## S3 method for class 'sp'
autoplot_by_species(
  object,
  species = "all",
  fill = "black",
  shape = 21,
  point_size = 3,
  hide_color_legend = FALSE,
  xlim = NULL,
  ylim = NULL,
  custom_theme = NULL,
  ...
)

Arguments

object

An object created with sp() or sp_elev().

species

A character vector giving values in the column sp. The output will be a list with as many plots as elements in this vector. The string "all" (default) plots all unique values of sp.

fill

Character; either a color or "sp", which maps each species to a different color.

shape

A number giving point shape (as in graphics::points()). Passed to ggplot2::geom_point().

point_size

A number giving point size. Passed to ggplot2::geom_point().

contour_size

A number giving the size of the contour of elevation lines. Passed to ggplot2::stat_contour() (see ggplot2::geom_contour()).

low, high

A string giving a color of the elevation lines representing low and high elevation.

hide_color_legend

Logical; TRUE hides the color legend.

bins

A number giving the number of elevation lines to plot.

add_elevation_labels

Logical; FALSE hides elevation labels.

label_size, label_color, fontface

A number (label_size) or character string (label_color and fontface) giving the size, colour and fontface of the text labels for the elevation lines.

xyjust

A number to adjust the position of the text labels of the elevation lines.

xlim, ylim

A vector of length 2, for example c(0, 500), giving the minimum and maximum limits of the vertical and horizontal coordinates.

custom_theme

A valid ggplot2::theme(). NULL uses the default theme theme_default().

...

Not used (included for compatibility across methods).

Details

⁠autoplot_by_species(sp_elev(DATA-WITH-VARIABLE-sp)⁠ (without elevation data) is equivalent to autoplot_by_species(sp(DATA-WITH-VARIABLE-sp)).

fgeo.plot wraps some functions from the ggplot2 package. For more control you can use ggplot2 directly.

Value

A list of objects of class "ggplot".

See Also

autoplot(), sp(), sp_elev().

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp_elev(), sp()

Other functions to plot elevation: autoplot.sp_elev(), elev(), sp_elev()

Other functions to plot species: autoplot.sp_elev(), sp_elev(), sp()

Examples

assert_is_installed("fgeo.x")

# Species ---------------------------------------------------------------
# Small dataset with a few species for quick examples
census <- fgeo.x::tree6_3species

# Showing only two species for speed
autoplot_by_species(sp(census))[1:2]

# To print all plots in a .pdf see `?pdf()`
autoplot_by_species(sp(census))

# Species and elevation (optional) ---------------------------------------

# Species and elevation
elevation <- fgeo.x::elevation
autoplot_by_species(sp_elev(census, elevation))

Allow autoplotting the column elev.

Description

Allow autoplotting the column elev.

Usage

elev(elev)

Arguments

elev

A ForestGEO-like elevation list or its col dataframe (with the column elev).

Value

An S3 object of class 'elev'.

See Also

autoplot.elev().

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), autoplot_by_species.sp_elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp_elev(), sp()

Other autoplots: autoplot.fgeo_habitat(), autoplot.sp_elev(), sp_elev(), sp()

Other functions to construct fgeo classes: sp_elev(), sp()

Other functions to plot elevation: autoplot.sp_elev(), autoplot_by_species.sp_elev(), sp_elev()

Examples

assert_is_installed("fgeo.x")

inherits(elev(fgeo.x::elevation), "elev")
inherits(elev(fgeo.x::elevation$col), "elev")

Pre-made headers.

Description

Pre-made headers.

Usage

header_dbh_bubbles(lang = "english")

Arguments

lang

String; Language of the header: Either "english" or "spanish".

See Also

Other functions to plot dbh bubbles: plot_dbh_bubbles_by_quadrat(), theme_dbh_bubbles()

Examples

cat(header_dbh_bubbles())

header_tag_status

Description

header_tag_status

Usage

header_tag_status()

See Also

Other functions to plot tag status: plot_tag_status_by_subquadrat(), theme_tag_status()

Examples

cat(header_tag_status())

Pre-made headers.

Description

Pre-made headers.

Arguments

lang

String; Language of the header: Either "english" or "spanish".


List dbh bubble-plots by quadrat (good for .pdf output).

Description

List dbh bubble-plots by quadrat (good for .pdf output).

Usage

plot_dbh_bubbles_by_quadrat(
  vft,
  title_quad = "Site Name, YYYY, Quadrat:",
  header = header_dbh_bubbles(),
  theme = theme_dbh_bubbles(),
  lim_min = 0,
  lim_max = 20,
  subquadrat_side = 5,
  tag_size = 2,
  move_edge = 0,
  status_d = "dead"
)

Arguments

vft

A ForestGEO ViewFullTable (dataframe).

title_quad

A string to use as a title.

header

A string to use as a header (see headers).

theme

An object of class "theme".

lim_min, lim_max

Minimum and maximum limits of the plot area.

subquadrat_side

Length in meters of the side of a subquadrat.

tag_size

A number giving tag size. Passed to ggrepel::geom_text_repel.

move_edge

A number to adjust the extension of the grid lines beyond the plot limits.

status_d

A character string indicating the value of the variable status that corresponds to dead stems.

Value

A list which each element is a plot of class ggplot.

See Also

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev(), plot_tag_status_by_subquadrat(), sp_elev(), sp()

Other functions to list plots from ForestGEO ViewFullTable: plot_tag_status_by_subquadrat()

Other functions to plot dbh bubbles: header_dbh_bubbles(), theme_dbh_bubbles()

Examples

assert_is_installed("fgeo.x")

# Create a small VieFullTable
first_n <- function(x, n) x %in% sort(unique(x))[1:n]
small_vft <- fgeo.x::vft_4quad %>%
  dplyr::filter(first_n(CensusID, 1) & first_n(QuadratID, 2)) %>%
  dplyr::sample_n(50)

plot_dbh_bubbles_by_quadrat(small_vft)

# To print all plots into a .pdf file see `?pdf()`
plot_dbh_bubbles_by_quadrat(small_vft)

# Be careful if subsetting by DBH: You may unintentionally remove dead trees.
# You should explicietly inlcude missing `DBH` values with `is.na(DBH)`
include_missing_dbh <- subset(small_vft, DBH > 20 | is.na(DBH))
plot_dbh_bubbles_by_quadrat(include_missing_dbh)

# Customizing the maps ----------------------------------------------------
# A custom title and header
myheader <- paste(
  " ",
  "Head column 1                     Head column 2                          ",
  " ",
  " ........................................................................",
  " ........................................................................",
  sep = "\n"
)

plot_dbh_bubbles_by_quadrat(
  small_vft,
  title_quad = "My Site, 2018. Quad:",
  header = myheader
)

# Skip R CMD check for speed

# Tweak the theme with ggplot
library(ggplot2)

plot_dbh_bubbles_by_quadrat(
  small_vft,
  title_quad = "My Site, 2018. Quad:",
  header = header_dbh_bubbles("spanish"),
  tag_size = 3,
  theme = theme_dbh_bubbles(
    axis.text = NULL, # NULL shows axis.text; element_blank() doesn't.
    plot.title = element_text(size = 15),
    plot.subtitle = element_text(size = 5),
    panel.background = element_rect(fill = "grey")
  )
)


List plots of tree-tag status by subquadrat (good for .pdf output).

Description

This function plots tree tags by status and outputs a list of plots that can be printed on a .pdf file. Each plot shows four subquadrats within a quadrat. The symbols on the plot represent the status of each tree – not the status of each stem. Although you should likely provide data of only one or two censuses, plot_tag_status_by_subquadrat() will summarize the data to reduce overplotting. The data on the plot summarizes the history of each stem across all censuses provided. Each tag will appear in the plot only once or twice:

Usage

plot_tag_status_by_subquadrat(
  vft,
  x_q = 20,
  x_sq = 5,
  y_q = 20,
  y_sq = 5,
  subquad_offset = NULL,
  bl = 1,
  br = 2,
  tr = 3,
  tl = 4,
  title_quad = "Site Name, YYYY. Quadrat:",
  show_page = TRUE,
  show_subquad = TRUE,
  point_shape = c(19, 4),
  point_size = 1.5,
  tag_size = 3,
  header = header_tag_status(),
  theme = theme_tag_status(),
  move_edge = 0
)

Arguments

vft

A ForestGEO ViewFullTable (dataframe).

x_q, y_q

Size in meters of a quadrat's side. For ForestGEO sites, a common value is 20.

x_sq, y_sq

Size in meters of a subquadrat's side. For ForestGEO-CTFS sites, a common value is 5.

subquad_offset

NULL or -1. NULL defines the first column of subquadrats as 1. -1 defines the first column of subquadrats as 0.

subquad_offset = NULL    subquad_offset = -1
---------------------    -------------------
     14 24 34 44             04 14 24 34
     13 23 33 43             03 13 23 33
     12 22 32 42             02 12 22 32
     11 21 31 41             01 11 21 31
bl, br, tr, tl

Number or character giving the label of the four subquadrats on each or the four divisions of a quadrat: bottom left (bl), bottom right (br), top right (tr), and top left (tl).

title_quad

A string to use as a title.

show_page

Logical; FALSE removes the page label from the plot title.

show_subquad

Logical; FALSE removes subquadrat labels on each plot.

point_shape

A vector of two numbers giving the shape of the points to plot (see possible shapes in the documentation of ?graphics::points(), under the section entitled 'pch' values).

point_size

A number giving points size. Passed to ggplot2::geom_point().

tag_size

A number giving tag size. Passed to ggrepel::geom_text_repel.

header

A string to use as a header (see headers).

theme

An object of class "theme".

move_edge

A number to adjust the extension of the grid lines beyond the plot limits.

Value

A list of objects of class "ggplot".

Acknowledgment

Useful ideas and guidance came from Suzanne Lao, Stuart Davis, Shameema Jafferjee Esufali, David Kenfack and Anudeep Singh. Anudeep Sinh also wrote the algorithm to calculate subquadrats.

See Also

graphics::points(), ggplot2::geom_point(), ggplot2::theme() header_tag_status(), theme_tag_status(), fgeo.tool::add_subquad(), ggrepel::geom_text_repel.

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), sp_elev(), sp()

Other functions to list plots from ForestGEO ViewFullTable: plot_dbh_bubbles_by_quadrat()

Other functions to plot tag status: header_tag_status(), theme_tag_status()

Examples

assert_is_installed("fgeo.x")

# Create a small VieFullTable
first <- function(x) x %in% sort(unique(x))[1]
small_vft <- subset(fgeo.x::vft_4quad, first(CensusID) & first(QuadratID))

p <- plot_tag_status_by_subquadrat(small_vft)
# Showing only two sub-quadtrats
p[1:2]

# To print all plots into a .pdf file see `?pdf()`
plot_tag_status_by_subquadrat(small_vft)

# Be careful if filtering by DBH: You may unintentionally remove dead trees.
# * If you filter by `DBH`, you loose the dead trees becaue their `DBH = NA`
# * You should explicietly inlcude missing DBH values with `is.na(DBH)`
include_missing_dbh <- subset(small_vft, DBH > 20 | is.na(DBH))
p <- plot_tag_status_by_subquadrat(include_missing_dbh)
# Showing only the first plot to keep the output short
p[[1]]

# Customizing the maps ----------------------------------------------------
# Common tweaks
p <- plot_tag_status_by_subquadrat(
  small_vft,
  title_quad = "BCI 2012. Quadrat: ",
  bl = "bottom-left", br = "bottom-right", tr = "top-right", tl = "top-left",
  header = "Line 1: _________\nLine 2:\nLine 3:.....................",
  subquad_offset = -1,
  point_size = 3, point_shape = c(17, 6),
  tag_size = 2,
  move_edge = 0.5
)
p[[1]]

# Skip R CMD check for speed

p <- plot_tag_status_by_subquadrat(
  small_vft,
  show_page = FALSE,
  show_subquad = FALSE
)
p[[1]]

# Themes
library(ggplot2)

p <- plot_tag_status_by_subquadrat(small_vft, theme = theme_gray())
p[[1]]

# Tweaking the default theme of plot_tag_status_by_subquadrat()
# For many more options see ?ggplot2::theme
small_tweak <- theme_tag_status(legend.position = "bottom")
p <- plot_tag_status_by_subquadrat(small_vft, theme = small_tweak)
p[[1]]


Objects exported from other packages

Description

These objects are imported from other packages. Follow the links below to see their documentation.

fgeo.tool

assert_is_installed

ggplot2

autoplot


Allow autoplotting the column sp.

Description

Allow autoplotting the column sp.

Usage

sp(sp)

Arguments

sp

A ForestGEO-like dataframe with the column sp.

Value

An S3 object of class 'sp'.

See Also

autoplot.sp().

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp_elev()

Other autoplots: autoplot.fgeo_habitat(), autoplot.sp_elev(), elev(), sp_elev()

Other functions to construct fgeo classes: elev(), sp_elev()

Other functions to plot species: autoplot.sp_elev(), autoplot_by_species.sp_elev(), sp_elev()

Examples

assert_is_installed("fgeo.x")

inherits(sp(fgeo.x::stem5), "sp")

Allow autoplotting the columns sp and elev.

Description

Allow autoplotting the columns sp and elev.

Usage

sp_elev(sp, elev = NULL)

Arguments

sp

A ForestGEO-like dataframe with the column sp.

elev

A ForestGEO-like elevation list or its col dataframe – with the column elev. The datasets you pass to sp and elev should come from the same forest plot. This is not compulsory but not doing so is most likely a mistake.

Value

An S3 object of class 'sp_elev'.

See Also

autoplot.sp_elev().

Other plot functions: autoplot.fgeo_habitat(), autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev(), plot_dbh_bubbles_by_quadrat(), plot_tag_status_by_subquadrat(), sp()

Other autoplots: autoplot.fgeo_habitat(), autoplot.sp_elev(), elev(), sp()

Other functions to construct fgeo classes: elev(), sp()

Other functions to plot elevation: autoplot.sp_elev(), autoplot_by_species.sp_elev(), elev()

Other functions to plot species: autoplot.sp_elev(), autoplot_by_species.sp_elev(), sp()

Examples

assert_is_installed("fgeo.x")

species_from_luquillo <- fgeo.x::stem5
elevation_from_luquillo <- fgeo.x::elevation

species_elevation <- sp_elev(species_from_luquillo, elevation_from_luquillo)
inherits(species_elevation, "sp_elev")

Suffix a strings where a vector exactly matches one specific string.

Description

Suffix a strings where a vector exactly matches one specific string.

Usage

suffix_match(string, to_match, .match, suffix)

Arguments

string

A vector of strings to suffix.

to_match

A vector of strings to match with .match.

.match

A string to match the vector to_match with.

suffix

A suffix to add at the end of each element of string.

Value

A modified version of x.

Examples

suffix_match(
  string = c("one", "banana"),
  to_match = c("number", "fruit"),
  .match = "number",
  suffix = "_num"
)

suffix_match(
  string = c("tag1", "tag2"),
  to_match = c("dead", "not-dead"),
  .match = "dead",
  suffix = ".d"
)

vft <- data.frame(
  Tag = c("01", "02"),
  Status = c("dead", "alive"),
  stringsAsFactors = FALSE
)
transform(vft, tagged = suffix_match(Tag, Status, "dead", ".d"))

Theme for theme_dbh_bubbles().

Description

Theme for theme_dbh_bubbles().

Usage

theme_dbh_bubbles(
  axis.text = element_blank(),
  panel.background = element_rect(fill = "white"),
  panel.grid.minor = element_blank(),
  panel.grid.major = element_blank(),
  legend.position = "none",
  plot.title = element_text(size = 20),
  plot.subtitle = element_text(size = 12),
  panel.border = element_rect(colour = "black", fill = NA),
  axis.ticks.length = unit(-0.1, "cm"),
  ...
)

Arguments

panel.background

background of plotting area, drawn underneath plot (element_rect(); inherits from rect)

legend.position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

plot.title

plot title (text appearance) (element_text(); inherits from title) left-aligned by default

plot.subtitle

plot subtitle (text appearance) (element_text(); inherits from title) left-aligned by default

panel.border

border around plotting area, drawn on top of plot so that it covers tick marks and grid lines. This should be used with fill = NA (element_rect(); inherits from rect)

...

additional element specifications not part of base ggplot2. In general, these should also be defined in the ⁠element tree⁠ argument.

See Also

Other functions to plot dbh bubbles: header_dbh_bubbles(), plot_dbh_bubbles_by_quadrat()

Examples

class(theme_dbh_bubbles())

Default plot theme.

Description

Default plot theme.

Usage

theme_default(p, panel.grid.minor = element_line(linetype = "dashed"), ...)

Arguments

p

A ggplot.

...

additional element specifications not part of base ggplot2. In general, these should also be defined in the ⁠element tree⁠ argument.

Examples

class(theme_default(ggplot2::ggplot(iris)))

Theme for plot_base_census().

Description

Theme for plot_base_census().

Usage

theme_tag_status(
  panel.grid.major = element_line(colour = "black"),
  panel.grid.minor = element_line(colour = "black", linetype = "dotted"),
  panel.background = element_rect(fill = "white"),
  plot.title = element_text(size = 20),
  plot.subtitle = element_text(size = 12),
  plot.caption = element_text(size = 8),
  legend.position = "top",
  legend.title = element_blank(),
  axis.ticks = element_blank(),
  axis.text = element_text(size = 12),
  ...
)

Arguments

panel.background

background of plotting area, drawn underneath plot (element_rect(); inherits from rect)

plot.title

plot title (text appearance) (element_text(); inherits from title) left-aligned by default

plot.subtitle

plot subtitle (text appearance) (element_text(); inherits from title) left-aligned by default

plot.caption

caption below the plot (text appearance) (element_text(); inherits from title) right-aligned by default

legend.position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

legend.title

title of legend (element_text(); inherits from title)

...

additional element specifications not part of base ggplot2. In general, these should also be defined in the ⁠element tree⁠ argument.

See Also

Other functions to plot tag status: header_tag_status(), plot_tag_status_by_subquadrat()

Examples

class(theme_tag_status())

Themes.

Description

This function outputs a theme for a specific function. You can customize any theme by changing the default arguments and also by passing more arguments to ggplot2::theme() (via ...).

Arguments

...

Additional arguments passed to ggplot2::theme().

Value

A ggplot2::theme().

See Also

ggplot2::theme().