Dear all, I use the code below for my barplot and it looks fine on my screen. But when I paste into my MSWord file, after having copied it by presing the camera, the colours change. The same actually happens when I change the size of the R Graphics Device window by dragging the corners. Could someone please help with this. I use R 1.6.2 on Win XP. Thanks in advance! Sincerely, Tord Sn?ll par(mar=c(5, 12, 1, 2), mai=c(1, 2.2, 0.01, 0.2), xpd=NA) # yttre kanterna och plotting ?ven i Margin V&R, sid 66 (palette(gray(seq(0,.9,len=25)))) # gray scales; print old palette barplot(as.matrix(t(nedbr[nedbr$fran.lan == "X", c("nedbr1volS.ha", "nedbr2volS.ha", "nedbr3volS.ha", "nedbr4volS.ha", "nedbr5volS.ha")])), names.arg = as.vector(nedbr[nedbr$fran.lan == "X", "Objektnamn"]), horiz=T, las=1, cex.names=0.8, xlab="Volym m3/ha", xlim=c(0,100), col=c(25,21,17,14,10)) legend(locator(1), c("Nedbrytning 1 (<10%)", "Nedbrytning 2 (10-25%)", "Nedbrytning 3 (25-50%)", "Nedbrytning 4 (50-75%)", "Nedbrytning 5 (75-100%)"), fill=c(25,21,17,14,10), cex=0.75) palette("default") # reset back to the default ----------------------------------------------------------------------- Tord Sn?ll Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University Villav?gen 14 SE-752 36 Uppsala, Sweden Tel: 018-471 28 82 (int +46 18 471 28 82) (work) Tel: 018-25 71 33 (int +46 18 25 71 33) (home) Fax: 018-55 34 19 (int +46 18 55 34 19) (work) E-mail: Tord.Snall at ebc.uu.se Check this: http://www.vaxtbio.uu.se/resfold/snall.htm! ------------------------------------------------------------------------
Tord Snall wrote:> Dear all, > > I use the code below for my barplot and it looks fine on my screen. But > when I paste into my MSWord file, after having copied it by presing the > camera, the colours change. The same actually happens when I change the > size of the R Graphics Device window by dragging the corners. > > Could someone please help with this. > > I use R 1.6.2 on Win XP. > > Thanks in advance!I cannot reproduce such an behaviour on WinNT 4.0. Could you provide an example which we can reproduce, please? (preferable using data like 1:10 ...) Uwe Ligges> Sincerely, > Tord Sn?ll > > par(mar=c(5, 12, 1, 2), mai=c(1, 2.2, 0.01, 0.2), xpd=NA) # yttre kanterna > och plotting ?ven i Margin V&R, sid 66 > (palette(gray(seq(0,.9,len=25)))) # gray scales; print old palette > barplot(as.matrix(t(nedbr[nedbr$fran.lan == "X", c("nedbr1volS.ha", > "nedbr2volS.ha", "nedbr3volS.ha", "nedbr4volS.ha", "nedbr5volS.ha")])), > names.arg = as.vector(nedbr[nedbr$fran.lan == "X", "Objektnamn"]), > horiz=T, las=1, cex.names=0.8, xlab="Volym m3/ha", xlim=c(0,100), > col=c(25,21,17,14,10)) > > legend(locator(1), c("Nedbrytning 1 (<10%)", "Nedbrytning 2 (10-25%)", > "Nedbrytning 3 (25-50%)", > "Nedbrytning 4 (50-75%)", "Nedbrytning 5 (75-100%)"), > fill=c(25,21,17,14,10), cex=0.75) > palette("default") # reset back to the default > > > ----------------------------------------------------------------------- > Tord Sn?ll > Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet > Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University > Villav?gen 14 > SE-752 36 Uppsala, Sweden > Tel: 018-471 28 82 (int +46 18 471 28 82) (work) > Tel: 018-25 71 33 (int +46 18 25 71 33) (home) > Fax: 018-55 34 19 (int +46 18 55 34 19) (work) > E-mail: Tord.Snall at ebc.uu.se > Check this: http://www.vaxtbio.uu.se/resfold/snall.htm! > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Dear Uwe, When I prepred simple code I found the problem: I had executed the row palette("default") and after that I copied and dragged the R Graphics Device window. If I copy and drag after having executed the line before ( fill=c(25,21,17,14,10), cex=0.75) ) everything looks fine. Thanks for, as always, quick responses on this list! Sincerely, Tord At 08:51 2/27/2003 +0100, Uwe Ligges wrote:>Tord Snall wrote: >> Dear all, >> >> I use the code below for my barplot and it looks fine on my screen. But >> when I paste into my MSWord file, after having copied it by presing the >> camera, the colours change. The same actually happens when I change the >> size of the R Graphics Device window by dragging the corners. >> >> Could someone please help with this. >> >> I use R 1.6.2 on Win XP. >> >> Thanks in advance! > >I cannot reproduce such an behaviour on WinNT 4.0. >Could you provide an example which we can reproduce, please? >(preferable using data like 1:10 ...) > >Uwe Ligges > > > >> Sincerely, >> Tord Sn?ll >> >> par(mar=c(5, 12, 1, 2), mai=c(1, 2.2, 0.01, 0.2), xpd=NA) # yttre kanterna >> och plotting ?ven i Margin V&R, sid 66 >> (palette(gray(seq(0,.9,len=25)))) # gray scales; print old palette >> barplot(as.matrix(t(nedbr[nedbr$fran.lan == "X", c("nedbr1volS.ha", >> "nedbr2volS.ha", "nedbr3volS.ha", "nedbr4volS.ha", "nedbr5volS.ha")])), >> names.arg = as.vector(nedbr[nedbr$fran.lan == "X","Objektnamn"]),>> horiz=T, las=1, cex.names=0.8, xlab="Volym m3/ha", xlim=c(0,100), >> col=c(25,21,17,14,10)) >> >> legend(locator(1), c("Nedbrytning 1 (<10%)", "Nedbrytning 2 (10-25%)", >> "Nedbrytning 3 (25-50%)", >> "Nedbrytning 4 (50-75%)", "Nedbrytning 5 (75-100%)"), >> fill=c(25,21,17,14,10), cex=0.75) >> palette("default") # reset back to the default >> >> >> ----------------------------------------------------------------------- >> Tord Sn?ll >> Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet >> Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University >> Villav?gen 14 >> SE-752 36 Uppsala, Sweden >> Tel: 018-471 28 82 (int +46 18 471 28 82) (work) >> Tel: 018-25 71 33 (int +46 18 25 71 33) (home) >> Fax: 018-55 34 19 (int +46 18 55 34 19) (work) >> E-mail: Tord.Snall at ebc.uu.se >> Check this: http://www.vaxtbio.uu.se/resfold/snall.htm! >> ------------------------------------------------------------------------ >> >> ______________________________________________ >> R-help at stat.math.ethz.ch mailing list >> http://www.stat.math.ethz.ch/mailman/listinfo/r-help > > >----------------------------------------------------------------------- Tord Sn?ll Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University Villav?gen 14 SE-752 36 Uppsala, Sweden Tel: 018-471 28 82 (int +46 18 471 28 82) (work) Tel: 018-25 71 33 (int +46 18 25 71 33) (home) Fax: 018-55 34 19 (int +46 18 55 34 19) (work) E-mail: Tord.Snall at ebc.uu.se Check this: http://www.vaxtbio.uu.se/resfold/snall.htm! ------------------------------------------------------------------------