Commit 13769754 authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Merge branch 'fix_plot_results' into 'master'

Increase the range of colors. Specify the R package name to avoid the use a...

See merge request !34
parents 2daf88e9 b03850e1
Pipeline #39554 passed with stages
in 14 minutes and 35 seconds
......@@ -68,19 +68,10 @@ plot_results <- function(inPath, color = NULL) {
# loads the variable threshold
load(paste("threshold_step_", ni, sep = ""))
thres <- threshold
class <- stack(files[1:length(files)], files[1])
class <- raster::stack(files[1:length(files)], files[1])
col <- colorRampPalette(
c(
"red",
"sienna1",
"yellow",
"limegreen",
"forestgreen",
"blue",
"darkviolet",
"lightgrey"
)
c('#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3')
)
###Classification
......@@ -97,7 +88,7 @@ plot_results <- function(inPath, color = NULL) {
class[[i]] <- dummy
}
}
modelHS <- merge(class[[1:(numberHabitats + 1)]])
modelHS <- raster::merge(class[[1:(numberHabitats + 1)]])
##3.b.1##
brk = seq(0.5, numberHabitats + 1.5, 1)
......@@ -109,14 +100,14 @@ plot_results <- function(inPath, color = NULL) {
}
if (length(color) == 0) {
plot(
raster::plot(
modelHS,
col = col(numberHabitats + 1),
breaks = brk,
legend.shrink = 1
)
} else {
plot(
raster::plot(
modelHS,
col = color,
breaks = brk,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment