[R] Changing font type within y axis labels

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Fri Jul 29 16:10:52 CEST 2011


Hi Philip,
have a look at ?plotmath and try

mtext(expression(paste("Total Landings of"~~italic("Pecten
maximus"),"(tonnes)")), side=2,line=2)

"~~" is used for extra space between plain and italic font, but that
might be a matter of taste.

hth.

Am 29.07.2011 15:34, schrieb Philip Boulcott:
> I wish place the following axis label in such a manner that some of the
> text is plain and the scientific name is in italics (i.e. a mixture of
> two font types)
> 
>  
> 
>  
> 
> Using plot:
> 
>  
> 
> mtext("Total Landings of Pecten maximus (tonnes)",font,=3, side=2,
> line=3)
> 
>  
> 
> makes everything italic, but how do I apply the font change to only
> "Pecten maximus"?
> 
>  
> 
> Rgds
> 
>  
> 
> Phil
> 
>  
> 
>  
> 
>  
> 
> ........................................................................
> .....
> 
>  
> 
> Dr Philip Boulcott
> 
> Marine Ecosystems Processes
> 
> Marine Scotland - Science
> 
>  
> 
> Scottish Government | Marine Laboratory
> 
> 375 Victoria Road, Rm B13, Aberdeen, Scotland, AB11 9DB
> 
>  
> 
> Tel:  +44 (0)1224 295439
> 
> S/B: +44 (0)1224 876544
> 
> Fax: +44 (0)1224 295511
> 
> e: p.boulcott at marlab.ac.uk  
> 
> w: http://www.scotland.gov.uk/marinescotland
> <http://www.scotland.gov.uk/marinescotland>     
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.


-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790



More information about the R-help mailing list