[R] Colors in mtext
Spencer Graves
spencer.graves at pdf.com
Mon Jul 4 21:41:08 CEST 2005
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:
mtext(text=c("string1","string2","string3"),
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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA
spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel: 408-938-4420
Fax: 408-280-7915
More information about the R-help
mailing list