Joaquin,

p <-levelplot(frame, colorkey=TRUE)
print(update(p, legend=NULL), position=c(0/4,0,1/4,1), more=TRUE)
print(update(p, legend=NULL),  position=c(1/4,0,2/4,1), more=TRUE)
print(update(p, legend=NULL),  position=c(2/4,0,3/4,1), more=TRUE)

draw.colorkey(p$legend$right$args$key, draw=TRUE,
                     vp=grid::viewport(x=grid::unit(.9, "npc"),
                                              y=grid::unit(.5, "npc"),
                                              height=grid::unit(.8, "npc")))

This should get you started.  In your original code the print.trellis
function is leaving enough space for
the legend in your third usage, hence the graph is smaller.

The above code suppresses the legend all three times.
That way the same space is allocated for the graph.  Then the key is printed
using
the grid functions directly.

Rich

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to