[R] barplot2

Marc Schwartz mschwartz at medanalytics.com
Wed Apr 16 14:43:04 CEST 2003

>-----Original Message-----
>From: r-help-bounces at stat.math.ethz.ch 
>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Marwan Khawaja
>Sent: Wednesday, April 16, 2003 11:41 AM
>To: R
>Subject: [R] barplot2
>I get a nice looking barplot using the barplot2 function in 
>the gregmisc
>    body2 <- barplot2(hh3, beside = TRUE,
>            col = c("mistyrose", "lightcyan"),
>    ....
>    cex.names = 1.0, plot.ci = TRUE, ci.l = cil, ci.u = ciu,
>            plot.grid = TRUE)
>    box()
>However, obviously I lose the collors when converting from ps 
>to a pdf (outside of R) but I get a single shaded pattern! Is 
>it my choice of collors? Or the conversion software I am 
>using? Any help would be appreciated. TIA Marwan


I don't have your full code, but I used barplot2() in R 1.6.2 under
WinXP Pro to generate a simple bar plot with two bars in the colors
that you have above. I can generate a .PS file and then convert it to
.PDF using GhostScript/GSView and default settings without problem.
The colors are properly retained.

Can you provide your full code so that I can exactly replicate your
plot and specify what program you are using to do the PS to PDF


Marc Schwartz

More information about the R-help mailing list