[R] trouble getting output from graphs, again
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sun Apr 14 01:01:15 CEST 2002
Paul Johnson <pauljohn at ku.edu> writes:
> http://lark.cc.ukans.edu/~pauljohn/ResearchPapers/meanProtest-box.eps
>
> When I asked about these chores about 6 months ago, I got some tips
> which have worked other times. I had the impression that if I set the
> size of the x11 device to match the eventual ps output size, then all
> would be OK. But its not this time.
>
> Here's my code:
>
> dat <- read.table("a816bstat7vis.csv",header=T);
> attach(dat)
>
> x11(height=6, width=6,pointsize=12)
>
> plot (pop,meanProtWnoActivists,pch=22, main="Mean Protest Level During
> Experiment",xlab="population",ylab="mean protest",ylim=c(0,100));
>
> points(pop,meanProtW10Activists,pch=23,col="blue")
>
> points(pop,meanProtW20Activists,pch=24,col="red")
>
> legend(locator(1),c("w/0 activists","w/10 activists","w/20 activists"),pch=c(22,23,24),col=c("black","blue","red"))
>
> dev.copy(device=postscript,file="meanProtest.eps",width=6,height=6,pointsize=12)
> dev.off()
> dev.copy(device=png,file="meanProtest.png",width=500,height=500)
> dev.off()
Hm? I don't have your data file, but this works for me:
x11(height=6, width=6, pointsize=12)
plot(1)
legend(locator(1),c("w/0 activists","w/10 activists",
"w/20 activists"),pch=c(22,23,24),col=c("black","blue","red"))
dev.copy(device=postscript,file="meanProtest.eps",
width=6,height=6,pointsize=12)
dev.off()
Looks like all your point markers and fonts have become inflated
somehow?
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list