Re: [R] Colors in mtext

From: Spencer Graves <>
Date: Tue 05 Jul 2005 - 05:41:08 EST

          The documentation "?mtext" says that "adj" is "adjustment for each string in reading direction. For strings parallel to the axes, 'adj=0' means left or bottom alignment, and 'adj=1' means right or top alignment." With this information, I tried the following, which looks like it may be close to what you are requesting:


       adj=c(0, .5, 1), col=c("black","blue","red"), side=3, line=0)

          spencer graves

Christof Bigler wrote:
> I want to assign different colors to different strings using
> mtext(...). However, when I use something like
> mtext(text=c("string1","string2","string3"),
> col=c("black","blue","red"), side=3, line=0)
> string2 and string3 are printed over string1. When I use
> paste("string1","string2","string3"), the series of strings are printed
> one over each other, but I still don't get different colors for
> different strings.
> Any solutions?
> Christof
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA <>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Tue Jul 05 05:47:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:12 EST