Skip to content
Prev 172081 / 398503 Next

filled.contour and time axis

The filled.contour help page offers a somewhat more extensive example  
for using plot.axes than you have attempted:

plot.axes = { axis(1, seq(100, 800, by = 100)) axis(2, seq(100, 600,  
by = 100)) },
And looking at the help page for axis() shows that the default setting  
for at is NULL, so it is "correctly formatted" as called, and you  
instead need to tell axis where to place the ticks and labels. This  
minor hack of the filled.contour example using the pretty function may  
offer ideas that you can apply to your code (whatever it might be.)
  x <- 10*1:nrow(volcano)
  y <- 10*1:ncol(volcano)
  filled.contour(x, y, volcano, color = terrain.colors,
     plot.title = title(main = "The Topography of Maunga Whau",
      xlab = "Meters North", ylab = "Meters West"),
      plot.axes = { axis(1, pretty(x,min=0))
                    axis(2, seq(100, 600, by = 100)) },
      key.title = title(main="Height\n(meters)"),
      key.axes = axis(4, seq(90, 190, by = 10)))# maybe also asp=1
  mtext(paste("filled.contour(.) from", R.version.string),
        side = 1, line = 4, adj = 1, cex = .66)
# Bottom line ... read the axis help page and the links from it.