On 2/14/2007 1:32 PM, Tyler Smith wrote: > Hi, > > I'd like to make the text in my legends italic, but I can't figure out > how to do so. font=3 doesn't work. Googling brings up the possibility > of expression(italic()), which produces italics, but I can't get this > to work with my label data, which is a vector of strings: > > legend(locator(1), legend = levels(factor(label.vector)), > col = plotting.colours, pch =plotsym.bw, cex = 0.7 ) > > How can I do this?
This should work: plot(1,1) savefont <- par(font=3) legend("topright", legend=c('Label 1', 'Label 2'), pch=1:2) par(savefont) Duncan Murdoch ______________________________________________ R-help@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 and provide commented, minimal, self-contained, reproducible code.