Were you suppressing warnings?  I get a warning along with the "unable
to start device 'png'" in some cases where it fails.  E.g., on Linux

> png("Figure1A.png", h = 7, w = 7, res = 1e5, units = "cm")
Error in png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to start device 'png'
In addition: Warning message:
In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  cairo error 'invalid value (typically too big) for the size of the
input (surface, pattern, etc.)'

or on Windows

> png("Figure1A.png", h = 7, w = 7, res = 100000, units = "cm")
Error in png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to start png() device
In addition: Warning messages:
1: In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  unable to allocate bitmap
2: In png("Figure1A.png", h = 7, w = 7, res = 1e+05, units = "cm") :
  opening device failed

or when the current directory is not writable (or does not exist)

> png("Figure1A.png", h = 7, w = 7, res = 1000, units = "cm")
> plot(1:5)
Error in plot.new() : could not open file 'Figure1A.png'




Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Thu, Feb 9, 2017 at 6:00 PM, Dario Strbenac
<dstr7...@uni.sydney.edu.au> wrote:
> Good day,
>
> Could the documentation of graphics devices give some explanation of how big 
> the bitmap limits are? For example,
>
>> png("Figure1A.png", h = 7, w = 7, res = 1000, units = "cm")
>
> Results in Error: unable to start png() device, but the help page of devices 
> doesn't explain that there are any limits or how they are determined. The 
> wording of the error message could also be improved, to explain that the 
> resolution is too high or the dimensions are too large.
>
>> sessionInfo()
> R version 3.3.2 Patched (2017-02-07 r72138)
> Platform: i386-w64-mingw32/i386 (32-bit)
> Running under: Windows 7 (build 7601) Service Pack 1
>
> --------------------------------------
> Dario Strbenac
> University of Sydney
> Camperdown NSW 2050
> Australia
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to