[R] working with groups of labels?

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Mon May 11 10:47:53 CEST 2009


> I have a graph with groups of variables.  I have include the group 
> names as variables so that I can have them positioned correctly. 
> Unfortunately this means that the group names have to follow all of 
> the same rules as the variables within the groups.  I would rather 
> have those group names left justified and bolded.
> 
> I know that I can do this in an mtext() function using font=2 and 
> adj=0, but I can never get the labels lined up exactly right.
> 
> Is there a simpler way of getting one group of labels right justified 
> and another group of labels left justified and still have them all 
> automatically positioned correctly?

mtext accepts vector inputs, so you can specify different justifications 
for different labels, e.g.

plot(1:10)
mtext(c("foo", "bar", "baz"), adj=c(0, 0.5, 1), side=1)

Regards,
Richie.

Mathematical Sciences Unit
HSL



------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}




More information about the R-help mailing list