(Corrected "Subject" !)>>>>> "Marwan" == Marwan Khawaja <marwan.khawaja at aub.edu.lb> >>>>> on Wed, 16 Apr 2003 09:41:07 -0700 writes:Marwan> Hello, Marwan> I get a nice looking barplot using the barplot2 function in the gregmisc Marwan> package: Marwan> body2 <- barplot2(hh3, beside = TRUE, Marwan> col = c("mistyrose", "lightcyan"), Marwan> .... Marwan> cex.names = 1.0, plot.ci = TRUE, ci.l = cil, ci.u = ciu, Marwan> plot.grid = TRUE) Marwan> box() Marwan> However, obviously I lose the collors when Marwan> converting from ps to a pdf (outside of R) but I get Marwan> a single shaded pattern! Is it my choice of Marwan> collors? Or the conversion software I am using? Any Marwan> help would be appreciated. TIA Marwan a more useful example using standard R functions and reproducible data --- from help(barplot) : postscript("barp-VAD.eps", onefile=FALSE, horizontal=FALSE, height=4, width=6) data(VADeaths, package = "base") barplot(VADeaths, beside = TRUE, col = c("lightblue", "mistyrose", "lightcyan", "lavender", "cornsilk"), legend = rownames(VADeaths), ylim = c(0, 100)) title(main = "Death Rates in Virginia", font.main = 4) dev.off() ## Using Latex's epstopdf system("epstopdf barp-VAD.eps") #--> barp-VAD.pdf ## Use Acrobat reader: system("acroread barp-VAD.pdf &") ## alternatively, requiring a newer `gv' (GView) which can deal with pdf: system("gv barp-VAD.pdf &") --- Looks perfect (Linux). Hence, yes, it's your conversion software! Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><
>-----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 > > >Hello, >I get a nice looking barplot using the barplot2 function in >the gregmisc >package: > > 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 MarwanMarwan, 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 conversion? Regards, Marc Schwartz
Hello,
I get a nice looking barplot using the barplot2 function in the gregmisc
package:
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
> R.version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 6.2
year 2003
month 01
day 10
language R
======================Marwan Khawaja
marwan.khawaja@aub.edu.lb
Associate Professor & Director
http://webfaculty.aub.edu.lb/~mk36
Center for Research on Population & Health
American University of Beirut +961 1 35 00
00 ext. 4640 (O))
Beirut 1107 2020, Lebanon Fax: +961 1 74
44 70
[[alternate HTML version deleted]]