I am plotting a raster image from the data stored in a file by using the three lines of code given below. However, I wish to generate a legend (or color-chart) below the image. The default legend is generated on the right hand side. Any idea how I may get legend at desired location.
Secondly, I am getting a rectangle around the image which I don’t require in the final plot. Please help me with these issues.
temp_var<-raster(input)
par(mar=c(0,0,0,0))
plot(temp_var,legend=F,axes=FALSE)
Thanks…
I have fought with the rectangle in
plot()method forRaster*objects. I am sure there is a way to get rid of it, but you don’t need to. I have always used this workaround:As for your legend, I believe you will have to build that manually to your specs. Try: