[R] Using roman and italic fonts in an xlab expression for a plot

David Barron mothsailor at googlemail.com
Thu Nov 23 13:35:00 CET 2006

Something like:

xlab=expression(paste("The excess level is",italic(" M")))

in your plot command should do the trick.  See ?plotmath.

On 23/11/06, Philip Boland <philip.j.boland at ucd.ie> wrote:
> Just wondering if it is possible to put something like
> "The excess level is M"
> in the xlab position of a plot but where the M is in italic font and
> the rest in ordinary (or Roman) font.
> Thanks - Phil Boland
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.

David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

More information about the R-help mailing list