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

Plots in Windows are always heavily aliased #2142

Open
jackbrookes opened this issue Feb 6, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@jackbrookes
Copy link

commented Feb 6, 2018

Default plots in WIndows have terrible aliasing. This can be fixed by using type = "cairo" when saving with (e.g.) ggsave. However, the Plots pane in RStudio doesn't use this option. Often it is convenient to save plots directly from the editor but this leads to ugly plots, especially when using small points or thin lines.

ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) + 
    geom_point() +
    stat_smooth(method = "lm", col = "red") + 
    labs(title = "Normal") +
    ggsave("normal.png") +
    labs(title = "Cairo") +
    ggsave("cairo.png", type = "cairo")

5f688f5b706e8f4397ee749afce6dd649f6cc2e9
(Notice, in particular, jagged red line when zoomed in on normal plot)

This could be solved by having an option for cairo rendering in RStudio or making cairo the default.

@ronblum

This comment has been minimized.

Copy link

commented Feb 6, 2018

@jackbrookes I agree with you about the default on Windows, and how much better it looks with Cairo. We'll consider your enhancement request to add an option for type in future releases. Thank you!

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2019

I'm putting this into the v1.3 milestone for consideration (this will become more important especially as high DPI displays become more common on Windows machines as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.