dipetkov / eems

Estimating Effective Migration Surfaces
GNU General Public License v2.0
102 stars 28 forks source link

Error in bitmap #29

Closed ZachNikolakis closed 5 years ago

ZachNikolakis commented 6 years ago

Dear Dr. Petkova,

I am trying to use eems.plots but I keep getting this error message : Error in bitmap(paste0(plotpath, "%02d.png"), type = "png16m", res = plot.params$res, : GhostScript was not found I have tried running the script with the example data using the same input commands from the EEMS doc. Any help on the matter is greatly appreciated.

Best, Zach

dipetkov commented 6 years ago

Is Ghostscript installed on your machine?

If you check the help for the bitmap function, you will see that it requires Ghostscript.

dev2bitmap works by copying the current device to a postscript or pdf device, and post-processing the output file using ghostscript. bitmap works in the same way using a postscript device and post-processing the output as ‘printing’.

You will need ghostscript: the full path to the executable can be set by the environment variable R_GSCMD. If this is unset, a GhostScript executable will be looked for by name on your path: on a Unix alike "gs" is used, and on Windows the setting of the environment variable GSC is used, otherwise commands "gswi64c.exe" then "gswin32c.exe" are tried.

Have you tried the out.png=FALSE option to try to generate the plots as PDFs?

ZachNikolakis commented 5 years ago

Using out.png=FALSE worked. Thank you