I have a dataframe in which values c are specified for Cartesian coordinates (x, y). I use plot() and the result has too much space in Y-axis. Is there a way to edit that?
library(raster)
x <- c(1:60)
y <- c(2:5)
c <- rnorm(60)
Data1 <- data.frame(x, y, c)
raster1 <- rasterFromXYZ(Data1)
plot(raster1)

spplot()orrasterVis::levelplot(), which are more sophisticated in their adjustment of the plot's x and y limits. (Tryspplot(raster1)to see what I mean by that.) - Josh O'Brienimage()also gets the job done and that's a part of the raster package. - Badgerimage(raster1, asp=1), to get the aspect ratio right, you're right back to the same problem the OP started with... - Josh O'Brienplot(). - Josh O'Brien