Hi, I like to plot all my 5 spatial maps of drought indices in a single window using the sf plot function in R. I am able to plot all maps separately but unable to plot altogether. All indexes are showing drought indices.
I really appreciate your help! Here is the code: #merging using merge function merge_drought_indices <- merge(shp_dist, drought_indices) view(merge_drought_indices) #plot in a single window library(sp) par(mfrow=c(2,2)) plot(merge_drought_indices["r_count_lt_p05_harvest_end"], pal = colorRampPalette(c("red", "white", "blue","green")), main = "End harvest index variation in India during drought year 2000", key.pos = 4, axes = TRUE, key.width = lcm(1.3), key.length = 1.0) plot(merge_drought_indices["r_count_lt_p05_harvest"], pal = colorRampPalette(c("red", "white", "blue","green")), main = "Harvest variation index in India during drought year 2000", key.pos = 4, axes = TRUE, key.width = lcm(1.3), key.length = 1.0) plot(merge_drought_indices["r_count_lt_p05_main"], pal = colorRampPalette(c("red", "white", "blue","green")), main = "Main growth stage index variation in India during drought year 2000", key.pos = 4, axes = TRUE, key.width = lcm(1.3), key.length = 1.0) plot(merge_drought_indices["r_count_lt_p05_plant.start"], pal = colorRampPalette(c("red", "white", "blue","green")), main = "Plant start index variation in India during drought year 2000", key.pos = 4, axes = TRUE, key.width = lcm(1.3), key.length = 1.0) plot(merge_drought_indices["r_count_lt_p05_plant"], pal = colorRampPalette(c("red", "white", "blue","green")), main = "main plant stage index variation in India during drought year 2000", key.pos = 4, axes = TRUE, key.width = lcm(1.3), key.length = 1.0) Regards and Thanks, Ranjeet -- *"Simple Heart, Humble Attitude and Surrender to Supreme Being make our lives beautiful!"* [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.