[R] Mtext doesn't display characters in italic when I use a greek symbol
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Aug 7 10:39:44 CEST 2008
On Thu, 7 Aug 2008, michael watson (IAH-C) wrote:
> Following on from my previous mail!
>
> plot(1:10,1:10)
> mtext("title", side=3, adj=0, font=3, cex=1.5)
>
> This works as expected and puts the font in italics.
>
> tag <- "A)"
> suffix <- "genea::"
> plot(1:10,1:10)
> mtext(bquote(.(tag) ~ Delta * .(suffix)), side=3, adj=0, font=3,
> cex=1.5)
>
> Here, the font isn't in italics, it's normal.
>
> I presume this is some interplay with bquote(), or perhaps R doesn't
> know the italics version of the capital greek delta character?
R does, but (yet again) this is a mathematical symbol Delta, not a Greek
character. And there is only one font for mathematical symbols and that
is not italic in R's standard devices (unlike TeX).
I have already told you how to do this -- but on Windows you need an
up-to-date version of R, so please install an R-devel snapshot from CRAN.
tag <- "A)"
suffix <- "genea::"
plot(1:10,1:10)
mtext(paste(tag, "\u0394", suffix), side=3, adj=0, cex=1.5, font=3)
does work, and it even uses a consistent font.
In future I will only answer follow-up postings that use symbol vs Greek
character correctly ....
>
> Any idea how I can get it into italics?
>
> Thanks
> Mick
>
> Head of Informatics
> Institute for Animal Health
> Compton
> Berks
> RG20 7NN
> 01635 578411
>
> http://www.iah.ac.uk/research/bioinformatics/bioinf.shtml
>
> The information contained in this message may be confide...{{dropped:14}}
>
> ______________________________________________
> 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list