0

I am trying to save my figure with 900 dpi but at the same time I dont want it to exceed 40 megapixels.

ggsave(p, filename = 'fig.tiff',dpi = 900,compression = "lzw")

thanks

i tried limitsize option but it is in inches not in pixels

MMJJ
  • 21
  • 2
  • You should probably just specify the `height` and `width` as well as the `dpi` you want. Or at least say what you want to happen if the default height and width (taken from the current graphic device) result in 40 megapixels or more. – Gregor Thomas Nov 29 '22 at 14:30
  • Suppose your output is more than 49 sq inches (50 inches x 900 x 900 = 40.5 megapixels) -- what should happen? – Jon Spring Nov 29 '22 at 15:33
  • thank you guys, I thought there is a way where you can set the megapixel limits and it will set the height and width automatically. I set the `height` and `width` manually and everything is fine. Thanks again – MMJJ Nov 29 '22 at 19:13

0 Answers0