Description Usage Arguments Value Author(s) Examples
View source: R/lucC_plot_raster_results.r
Plot map ggplot2 for all events discovered in input data
1 2 3 4 5 | lucC_plot_raster_result (raster_obj = NULL, data_mtx = NULL,
timeline = NULL, label = NULL, custom_palette = FALSE, RGB_color = NULL,
plot_ncol = 5, relabel = FALSE, original_labels = NULL, new_labels = NULL,
legend_text = "Legend:", columns_legend = 4, shape_point = 0,
colour_point = "black", size_point= 1)
|
raster_obj |
Raster. A raster brick with classified images |
data_mtx |
Matrix. A matrix with values obtained from predicates RECUR, EVOLVE, CONVERT or HOLDS |
timeline |
Character. A list of all dates of classified raster, timeline |
label |
Character. All labels of each value of pixel from classified raster |
custom_palette |
Boolean. A TRUE or FALSE value. If TRUE, user will provide its own color palette setting! Default is FALSE |
RGB_color |
Character. A vector with color names of original raster, same order. Default is setting scale_colour_hue |
plot_ncol |
Numeric. A number of columns to show the maps. Default is 5 |
relabel |
Boolean. A TRUE or FALSE value. If TRUE, user will provide its own legend text setting! Default is FALSE |
original_labels |
Character. A vector with original labels from legend text, for example, c("Forest","Pasture") |
new_labels |
Character. A vector with new labels to legend text, for example, c("Mature_Forest","Pasture1") |
legend_text |
Character. A text legend to show in plot. Default is "Legend:" |
columns_legend |
Integer. A number with the desired number of columns in legend. Default is 4 |
shape_point |
Numeric or Character. Is a shape point for events highlighted over map. Default is 0. This includes different points symbols commonly used in R as "pch", such as numeric values like 0 to square, 1 to circle and 4 to cross shape. And also other characters can be used including ".", "+", "*", "-", "#". |
colour_point |
Numeric. Is a colour for the shape point for events highlighted over map. Default is black |
size_point |
Numeric. Is a size of the shape point around pixels in plot. Default is 1 |
Plot with input data as colored map
Adeline M. Maciel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
library(lucCalculus)
file <- c(system.file("extdata/raster/rasterSample.tif", package = "lucCalculus"))
rb_class <- raster::brick(file)
my_label <- c("Degradation", "Fallow_Cotton", "Forest", "Pasture", "Soy_Corn", "Soy_Cotton",
"Soy_Fallow", "Soy_Millet", "Soy_Sunflower", "Sugarcane", "Urban_Area", "Water")
my_timeline <- c("2001-09-01", "2002-09-01", "2003-09-01", "2004-09-01", "2005-09-01",
"2006-09-01", "2007-09-01", "2008-09-01", "2009-09-01", "2010-09-01",
"2011-09-01", "2012-09-01", "2013-09-01", "2014-09-01", "2015-09-01",
"2016-09-01")
a <- lucC_pred_holds(raster_obj = rb_class, raster_class = c("Degradation", "Pasture"),
time_interval = c("2007-09-01","2010-09-01"),
relation_interval = "equals", label = my_label,
timeline = my_timeline)
lucC_plot_raster_result(raster_obj = rb_class, data_mtx = a,
timeline = my_timeline, label = my_label,
custom_palette = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.