Hi…

I want to use grImport to create a watermark on a plot() using the methods
Paul Murrell describes here:
http://cran.r-project.org/web/packages/grImport/vignettes/import.pdf (page
28). I can essentially reproduce this manually at the R prompt, and
independently I can use grid.picture(…) successfully in a R script, but
when I attempt to do do this in my script:

•
•
•
postscript(outputFilename,paper="us")

grid.picture(noaalogo,distort=FALSE,width=0.5,x=0.50,y=0.50)
grid.rect(gp=gpar(fill=rgb(1,1,1,0.9)))


plot(dat,xaxt="n",type="b",ylim=c(y_range[1],y_range[2]),main=labelStr,xlab="Date",ylab="Elevation,
NAVD88 (Ft)")
•
•
•
dev.off()

The picture "noaalogo" is drawn, but either the plot() is obscured or is
not drawn at all. In either case, the "watermarking" effect is not
happening in my script, but does work as expected, manually, at the R
prompt. I'm sure this is a graphics device related issue, but I have not
been able to find a solution through my searches.

Thank you,
Tom


-- 

Thomas E Adams

Development & Operations Hydrologist
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

http://www.erh.noaa.gov/er/ohrfc/

EMAIL:  thomas.ad...@noaa.gov
VOICE:  937-383-0528
FAX:    937-383-0033

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to