USGS-R / smwrGraphs

Moved to: https://code.usgs.gov/water/analysis-tools/smwrGraphs
https://code.usgs.gov/water/analysis-tools/smwrGraphs
Other
18 stars 16 forks source link

setPage() appears to be passing unnecessary arguments to device() #14

Closed tjmills closed 9 years ago

tjmills commented 9 years ago

When using setPage to output plot as a format other than pdf the function fails with the following error:

setPage(layout = "portrait", font = "preview", name = "USGS",
        multiple = FALSE, device = "svg")
Error in device(width = width, height = height, pointsize = fontSize,  : 
  unused arguments (rescale = "fixed", title = name, record = multiple)
tjmills commented 9 years ago

Also similar error for defaults settings:

setPage()
Error in device(width = width, height = height, pointsize = fontSize,  : 
  unused arguments (width = width, height = height, pointsize = fontSize, rescale = "fixed", title = name, record = multiple)
dlorenz-usgs commented 9 years ago

The function setPage does not set up arbitrary graphics devices. It is intended only to set up onscreen devices: windows, quartz, and X11. Each output device requires its own peculiar arguments to set up correctly to handle the requirements of the smwrGraphics environment. As of the current version, only the onscreen devices and pdf (required for publication graphs, using setPDF, and vignettes, using setSweave) and png (used in markdown, using setPNG).

On Tue, Jun 9, 2015 at 3:13 PM, T. Joe Mills notifications@github.com wrote:

setPage() appears to be passing unnecessary arguments to device()

— Reply to this email directly or view it on GitHub https://github.com/USGS-R/smwrGraphs/issues/14#issuecomment-110490123.

tjmills commented 9 years ago

I was using an outdated version of te package. setPNG and additional set.. functions provided the functionality I was looking for. Thanks!