[R] barplot problem

Tyler Smith tyler.smith at mail.mcgill.ca
Tue Nov 20 20:40:59 CET 2007


On 2007-11-20, jim holtman <jholtman at gmail.com> wrote:
> Does something like this work for you?  You can vary the mgp parameter
> for placement of the label.
>

You can also use mtext to place the axis label separately:

barplot(rev(modelledprofile),horiz=TRUE,xlim=c(0,1),col="cornflowerblue",names.arg=rev(depthnames),las=1)
mtext("depth", side = 2, line = 3)

The line option sets the distance from the axis - higher numbers will
give you more space. See ?mtext for details.

Tyler



More information about the R-help mailing list