Description Usage Arguments Value Examples
This function plots bivariate maps with their color matrix associated with gradients in the two variables or dimensions.
1 2 3 4 5 6 7 8 | bivarmap_map(
bivarmap,
colmatrix,
x_legend_pos = 0,
y_legend_pos = 0,
x_legend_size = 0.2,
y_legend_size = 0.2
)
|
bivarmap |
|
colmatrix |
|
A ggplot
plot of the bivariate map, with colors following a
bivariate color matrix, which is optionally also plotted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # package
library(bivarmap)
# data
data("temprec")
temprec
# color matrix
colmatrix <- bivarmap::bivarmap_colmatrix(nbreaks = 9,
xlab = "Temperatura",
ylab = "Precipitação")
colmatrix
# raster
raster_col <- bivarmap::bivarmap_raster(rasterx = temprec$temp,
rastery = temprec$prec,
colmatrix = colmatrix)
raster_col
# plot map
bivarmap::bivarmap_map(bivarmap = raster_col,
colmat = colmatrix,
x_legend_pos = .2,
y_legend_pos = .1,
x_legend_size = .3,
y_legend_size = .3)
plot(raster_col)
plot(temprec)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.