Hi all,

after having many images plots on my window, I want to have one single legend plot.

For that I use image.plot where the position is defined within smallplot:

image.plot(legend.only=T,zlim=c(0,400), col=rainbow(50),horizontal=T,smallplot=c(.05,.45, .03,.06))

This works fine, but I found that the labels of the x axis are too much far away from the axis.
Therefore I wanted to use

   par(mgp=c(0, 0.5, 0))

in order to write the labels closer to the axis.
It worked only when I specified, within image.plot
   legend.args=list(axis(side=1))

so:

image.plot(legend.only=T,zlim=c(0,400), col=rainbow(50),horizontal=T,smallplot=c(.05,.45, .03,.06),legend.args=list(axis(side=1)))

However, strangely I now have the labels twice: where I want to have them, OK, but they also appear at their old places, where I do not want to have them. I tried many ways of suppressing the labels that I do not want, also by using
axis.args=list(xlab="")
but it seemed that are "hard" connected to this smallplot

Does anyone already encounter such a problem?

Many thanks,

alb

______________________________________________
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