Deepayan Sarkar <deepayan.sar...@gmail.com> writes:

> You can specify a fixed-width fontfamily if that helps:
>
> levelplot(matrix(seq(4,120,l=9),3,3),
>           colorkey = list(at = seq(0, 120, 20),
>                           labels = list(labels = c('  0',' 20',' 40','
> 60',' 80','100','120'),
>                                         fontfamily = "courier",
>                                         font = 1)))

Thanks Deepayan; I think I finally found a solution which worked much
easier than I thought:

## Thanks to "R graphics, 2nd ed" Paul Murrell, page 250 shows how to edit
## an existing plot.
levelplot(matrix(-90:89,20,20))
grid.edit("[.]colorkey.labels$", grep=TRUE, just="right",
          global=T, x=unit(0.95, "npc"))

I can live with adjusting the x position by hand.

Stephen

______________________________________________
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