[R] Control over character height, width, skew etc.?

Paul Murrell paul at stat.auckland.ac.nz
Mon Nov 4 03:09:48 CET 2013


R's text-drawing functions, such as text() or grid.text(), do NOT allow 
you to skew or stretch individual characters (like PostScript does). 
Your strategy of using PostScript to produce a result and then import 
the result as a "shape" for R to draw may work (if you can script it).


On 11/03/13 14:46, Iakub Henschen wrote:
> I would like to add characters to R plots but need separate control over
> height, width, skew, rotation etc. These parameters result from a
> statistical computation within R. Also I need to be able to control stroke
> and fill parameters independently. Finally, I need more than just ASCII
> characters, but symbols and possibly Chinese/Japanese. What I've found so
> far points to a solution where I send the character and scale information
> to an external script that produces what I need in Postscript, then import
> via the grImport package. I assume there is a more direct way via editing R
> sources, such as inserting a transformation into text(), but that's
> probably not a good idea in the long run. Or is there a better strategy?
> 	[[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.

Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz

More information about the R-help mailing list