brks <- seq(1, 5, by=1)
nb <- length(brks)-1
cols <- brewer.pal(nb, "Reds")
pal <- colorRampPalette(cols)
png(file="frequency plot 2020.png",width=13.5,height=12,units="in",res=300)
par(mar=c(5,4,1,3.5))
#r3_is_raster
plot(r3,col = pal(nb),legend.width=1.4,breaks=brks,legend.shrink=1, axis.args=list(at=seq(0, 5, by=1),
labels=seq(0, 5, by=1), cex.axis=1),xlab="Longitude",ylab="Latitude",main=" Frequency of HW in 2020",legend.args=list(text='No.of heatwaves', side=4, font=2,line=2.3, cex=.8))
plot(data.shape, add=TRUE, lwd=2)
dev.off()
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.