[R] Problem with fontsize of pie-chart in postscript file

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Jan 8 15:49:04 CET 2003


par(cex=2) affects the currently open device, not ones you open in the
future.

So call it *after* opening the desired device.

On Wed, 8 Jan 2003, Daniel Hoppe wrote:

> Hi all,
>
> I've a problem with the size of the labels of my pie-charts when I try to
> write them to a postscript file. I need to increase the default size, so I
> change cex (see below). On screen this works fine, but cex doesn't seem to
> affect the postscript-file. Any suggestions?
>
> Thanks a lot,
>
> Daniel
>
> Copy/Past-example (will try to write to c:/temp!):
>
> labels <- c("I", "H", "G", "K", "V")
> lineItems <- c(6252,943605,271207,517764,44108)
> orders <- c(2084,226894,49218,164056,15809)
> value <- c(1380425,87743481,35212459,76346384,10403599)
> count <- c(52,17571,261,53270,843)
>
> col = gray(seq(0.2,.8,length=6))
>
> oldpar <- par()
> par(cex=2)
>
> #postscript("c:/temp/1.eps", onefile = FALSE)
> pie(lineItems, labels=labels, col=col, density=15, angle = 15 + 10 * 1:6)
> #dev.off()
>
> postscript("c:/temp/2.eps", onefile = FALSE)
> pie(orders, labels=labels, col=col, density=15, angle = 15 + 10 * 1:6)
> dev.off()
>
> postscript("c:/temp/3.eps", onefile = FALSE)
> pie(value, labels=labels, col=col, density=15, angle = 15 + 10 * 1:6)
> dev.off()
> par(oldpar)
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

-- 
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