[R] resolution of windows metafiles
Setzer.Woodrow@epamail.epa.gov
Setzer.Woodrow at epamail.epa.gov
Fri Dec 15 19:50:35 CET 2000
I am having trouble getting smooth-appearing curves in figures produced as
windows metafiles using R (R-1.1.1 on Windows 98). When I import them into
a word processor (either MS Word 97, or WordPerfect 9.0), the figures
appear only slightly bumpy on screen, but when printed, there is a clear
jaggedness reminiscent of aliasing. Is there a fix for this (if the answer
is "upgrade to 1.2", I'll be doing that as soon as binaries for Windows are
available, anyway)? Maybe metafiles have a coarse underlying resolution?
The following code produces the problem (along with a postscript plot just
to show that a smooth representation is possible):
# PlotTest.R
# 12/15/2000
#
# Demonstrate some curiosities with windows metafiles
xvals <- seq(0,1,length=101)
yvals <- xvals^3
win.metafile(file="test.wmf",width=4,height=3.5,
pointsize=12)
plot(xvals,yvals,type="l")
dev.off()
postscript(file="test.eps",horizontal=FALSE,width=4,height=3.5,
pointsize=12)
plot(xvals,yvals,type="l")
dev.off()
windows(width=4,height=3.5,pointsize=12)
plot(xvals,yvals,type="l")
dev.copy(win.metafile,file="test2.wmf",width=4,height=3.5,pointsize=12)
dev.off()
R. Woodrow Setzer, Jr. Phone:
(919) 541-0128
Experimental Toxicology Division Fax: (919) 541-5394
Pharmacokinetics Branch
NHEERL MD-74; US EPA; RTP, NC 27711
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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