0

I am working with raster data stored as .grd and .tif format. I am using levelplot to plot the data but after producing the plot I am unable to add all the axis values (coordinates in the figure). I am attaching an example figure below where only one x and one y axis in the subplot has the axis labels.

How can I add this for all the axis and tick marks?

library(raster)
library(rasterVis)
library(lattice)
s <- stack( list.files(pattern = "\\.grd$", include.dirs = TRUE) ) #load data
# Set par
my.at <- seq(-1, 1, 0.2)
ckey <- list(space = "bottom", at=my.at, labels = list(at=my.at), height = 0.5, width = 0.5,
             axis.title = "Annual Value") # axis.title is not getting printed
levelplot(s, margin = FALSE, col.regions = brewer.pal(length(my.at), "BrBG"), 
          at=my.at, colorkey = ckey, xlab = "", ylab = "")

I also want tick marks in between the subplots. How can I get it? And to add colorbar title.

In short how to get more tick marks between subplots and only want to write coordinate values for those tick marks located at the out edge of subplots.

pic

Vickel
  • 7,879
  • 6
  • 35
  • 56
S.H
  • 1
  • 2
    could you add some sample-data please? Eg with `dput()` see here: https://stackoverflow.com/a/5963610/1842673 – TobiO Dec 25 '19 at 22:40
  • 1
    Can you also clarify what you want? Do you just want tick labels at 10N and 35N with ticks in between? Or ... do you want ticks on both the left and right sides of the outer subplot boundaries? Also lower and upper subplot boundaries? Or both/all of the above? Or something else? – IRTFM Dec 26 '19 at 01:21

0 Answers0