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

ggsave error with type="cairo" or type="cairo-png" #4524

Closed
martin-a-wade opened this issue Jun 21, 2021 · 8 comments
Closed

ggsave error with type="cairo" or type="cairo-png" #4524

martin-a-wade opened this issue Jun 21, 2021 · 8 comments

Comments

@martin-a-wade
Copy link

ggsave produces an error when including type="cairo" or type="cairo-png", which worked in ggplot2 <=3.3.3.
(R4.0.3, Windows 10)

library(ggplot2)
p <- ggplot(mpg, aes(cty, hwy)) + geom_point()
ggsave("test.png", type = "cairo")
# also error for:
# ggsave("test.png", type = "cairo-png")

Error in png_dev(..., res = dpi, units = "in") :
unused argument (type = "cairo")

@tungttnguyen
Copy link

I am having the same problem. Pretty much all of my scripts have cairo inside ggsave and now return errors

@clauswilke
Copy link
Member

Should already be fixed. Please reinstall ggplot2 from CRAN and try again.

@thomasp85
Copy link
Member

No, this has not been fixed as it really isn't a bug (I do understand the inconvenience)

@clauswilke
Copy link
Member

I thought you turned the error into a warning? Am I confused?

05f63cd

@thomasp85
Copy link
Member

Oh yeah, sorry. Confused myself

@clauswilke
Copy link
Member

@martin-a-wade and @tungmilan Could you update your ggplot to 3.3.5 and let us know whether your scripts now work (except a warning that is issued)?

@martin-a-wade
Copy link
Author

martin-a-wade commented Jun 28, 2021 via email

@tungttnguyen
Copy link

Confirmed! Thank you guys!

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

No branches or pull requests

4 participants