plot_grid {flexurba}R Documentation

Plot the grid cell classification

Description

[Deprecated]

plot_grid() has been renamed to DoU_plot_grid() to create a more consistent API and to better indicate that this function is specifically designed for plotting the DEGURBA classification generated with DoU_classify_grid().

Usage

plot_grid(
  classification,
  extent = NULL,
  level1 = TRUE,
  palette = NULL,
  labels = NULL,
  title = NULL,
  scalebar = FALSE,
  filename = NULL
)

Arguments

classification

SpatRaster / character. A SpatRaster with the grid cell classification or the path to the grid cell classification file

extent

SpatExtent. If not NULL, the grid classification will be cropped to the provided extent before plotting

level1

logical. Whether the grid is classified according to level 1 of the Degree of Urbanisation (TRUE), or level 2 of the Degree of Urbanisation (FALSE).

palette

named vector with the color palette used to plot the grid cell classification. If NULL, the standard color palette of the GHSL is used (see GHSL_palette()).

labels

vector with the labels used in the legend. If NULL, the standard labels of the GHSL are used (see GHSL_labels()).

title

character. Title of the plot.t

scalebar

logical. Whether to add a scale bar to the plot.

filename

character. Path to the location to save the plot

Value

ggplot object


[Package flexurba version 0.2.2 Index]