Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ggsave() freezes/crashes R when width/height are too large and png #517

Closed
joey711 opened this Issue Apr 23, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

joey711 commented Apr 23, 2012

This is definitely in the category of "users shouldn't do that" ... but here we are.

For a brief moment I forgot that ggsave takes the width and height arguments as inches and not pixels, and I (stupidly) entered 400 for the width and height of my plot. The pdf option saved my graphic and it opened, though the points were invisibly small. The .png version, however, killed R with an error on my OS X 10.6 machine, and froze R as Not Responding on my OS X 10.7 machine.

I don't know where the upper limit is on size handling for large rasters, but if one is known, it might be nice to have a check that warns the user and doesn't even try to execute the save if one/both of the dimensions are over that limit.

Not a super important issue, but I did just trip on it.

Collaborator

wch commented May 7, 2012

I've done this many times also. I'd think that, say, 20x20 inches is a reasonable limit -- if it's larger than that, ggsave could print a message. Also, it would be good to have an option to suppress the messages.

@wch wch closed this in ccf3591 Aug 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment