Learn R Programming

simplevis (version 2.4.0)

ggplot_stars: Map of an array in ggplot.

Description

Map of an array in ggplot that is not coloured and not facetted.

Usage

ggplot_stars(data, pal = NULL, title = "[Title]", subtitle = NULL,
  caption = NULL, font_family = "Helvetica", font_size_title = NULL,
  font_size_body = NULL, title_wrap = 70, subtitle_wrap = 80,
  caption_wrap = 80, isMobile = FALSE)

Arguments

data

A stars object with 2 dimensions x and y. Required input.

pal

Character vector of hex codes, or provided objects with pal_ prefixes.

title

Title string. Defaults to "[Title]".

subtitle

Subtitle string. Defaults to "[Subtitle]".

caption

Caption title string. Defaults to NULL.

font_family

Font family to use. Defaults to "Helvetica".

font_size_title

Font size for the title text. Defaults to 11.

font_size_body

Font size for all text other than the title. Defaults to 10.

title_wrap

Number of characters to wrap the title to. Defaults to 70. Not applicable where isMobile equals TRUE.

subtitle_wrap

Number of characters to wrap the subtitle to. Defaults to 80. Not applicable where isMobile equals TRUE.

caption_wrap

Number of characters to wrap the caption to. Defaults to 80. Not applicable where isMobile equals TRUE.

isMobile

Whether the plot is to be displayed on a mobile device. Defaults to FALSE. If within an app with the mobileDetect function, then use isMobile = input$isMobile.

Value

A ggplot object.

Examples

Run this code
# NOT RUN {
ggplot_stars(data = example_stars)
# }

Run the code above in your browser using DataLab