Map of an array in ggplot that is not coloured and not facetted.
ggplot_stars(data, pal = NULL, title = "[Title]", title_wrap = 70, subtitle = NULL, subtitle_wrap = 80, caption = NULL, caption_wrap = 80, font_family = "Helvetica", font_size_title = NULL, font_size_body = NULL, isMobile = FALSE)
data | A stars object with 2 dimensions x and y. Required input. |
---|---|
pal | Character vector of hex codes. Defaults to viridis. Use the pals package to find a suitable palette. |
title | Title string. Defaults to "[Title]". |
title_wrap | Number of characters to wrap the title to. Defaults to 70. Not applicable where isMobile equals TRUE. |
subtitle | Subtitle string. Defaults to "[Subtitle]". |
subtitle_wrap | Number of characters to wrap the subtitle to. Defaults to 80. Not applicable where isMobile equals TRUE. |
caption | Caption title string. Defaults to NULL. |
caption_wrap | Number of characters to wrap the caption to. Defaults to 80. Not applicable where isMobile equals TRUE. |
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. |
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. |
A ggplot object.
ggplot_stars(data = example_stars)