Skip to content

Fix stack and clipping in facets #1789

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

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

thomasp85
Copy link
Member

Fixes #1786

@wch
Copy link
Member

wch commented Sep 28, 2016

It looks better but there's still a bit of a 3D look because the line weights aren't the same all the way around the facets.

Using your branch, I ran this code in RStudio on Linux:

p <- ggplot(mtcars, aes(wt, mpg)) +
  geom_point() +
  facet_grid(. ~ am) +
  theme_bw()

# RStudio
p

png('test-png.png', type = 'cairo', width = 300, height = 200)
print(p)
dev.off()

Cairo::CairoPNG('test-CairoPNG.png', width = 300, height = 200)
print(p)
dev.off()

RStudio:

image

png():

test-png

CairoPNG():

test-cairopng

@thomasp85
Copy link
Member Author

Hmm... I'm not sure there is anything more I can do from the facet side of things? All panels are clipped and positioned with the lowest z-value (just like before the rewrite)...

If you have time can you try to apply the old theme settings to the new version and see if it all stems from that?

@wch
Copy link
Member

wch commented Sep 29, 2016

Don't let my previous comment stop you from merging if this is the best that can be done - it's still an improvement from the current situation. I don't know if it every looked exactly right.

@thomasp85
Copy link
Member Author

For some reason both cairo calls crashes my machine, but in RStudio the plot is tack-sharp

@thomasp85 thomasp85 merged commit 565b501 into tidyverse:master Sep 30, 2016
@thomasp85
Copy link
Member Author

Ok I got it to work. 'cairo' still looks strange but regular png, RStudio itself, pdf etc looks as it should. I'm almost certain that it has something to do with the antialiasing done by cairo - this could be very susceptible to theme tweaks related to line width

@lock
Copy link

lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants