[R] changing font to italic for one entry in legend()

arun smartpink111 at yahoo.com
Fri Jun 8 03:02:35 CEST 2012


HI,

Have you tried italic()?
legend(expression(italic("Study area")).

It is untested as I am not in front of my linux system.
A.K.


legend(expression(italic("Expression species")

----- Original Message -----
From: Vikram Chhatre <crypticlineage at gmail.com>
To: r-help at r-project.org
Cc: 
Sent: Thursday, June 7, 2012 8:27 PM
Subject: [R] changing font to italic for one entry in legend()

Hello,

I need to change the font for one of the items (C. elegans) in my
legend to italic.  Can someone suggest how to accomplish this?

legend('bottomright', bty='n', c('C. elegans range', 'Study area'),
cex=0.8, fill=c('light gray', 'white'), border=c('black','black'))

I tried using lab.font=c(1,3) but R ignored and did not write the legend at all.

Any advice would be great.

Thanks.
V

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list