Good Morning, 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? Thanks, Phillip
> 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}}
Phillip Porter wrote:> Good Morning, > 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? >Hi Phillip, I'm not exactly sure how you are positioning the labels. Is it possible to give us an example with some data that will produce a plot to show what you want? It shouldn't be too hard to do. Jim