Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full support for ragg #4388

Merged
merged 4 commits into from
Apr 9, 2021
Merged

Conversation

thomasp85
Copy link
Member

Fix #4347

This PR does two things: First, it will use ragg as the default device if it is installed when generating png, jpeg, and tiff files. Second, it fixes the issue that has crippled the use of device = agg_png in ggsave, in that it explicitly sets the resolution and units to use in the device function that is passed in. While this only works for devices that uses res and units arguments it means that devices that uses the same signature as png() will work the same way

@thomasp85 thomasp85 added this to the ggplot2 3.3.4 milestone Mar 25, 2021
R/save.r Show resolved Hide resolved
@clauswilke
Copy link
Member

While you're at it, I would suggest to add at least the unit px, and maybe pt also. It seems strange to me that we can't specify output in px, the most commonly used unit in web design.

@thomasp85
Copy link
Member Author

Yeah — px should at least be supported. I don't think pt has much merit as an output dimension unit?

@clauswilke
Copy link
Member

Normally my attitude would be "it doesn't cost much to add pt so why not" but I can see that people might get confused about the difference between px and pt so maybe better leave it out.

@thomasp85
Copy link
Member Author

Yeah, that is kinda my worry as well

@thomasp85
Copy link
Member Author

I've added px support - @clauswilke can you give this a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ragg device functions not working with ggsave
2 participants