-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Line weights/colors don't look right with theme_bw() and facets #1786
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
Comments
@jiho @thomasp85 any ideas? Did clipping change? |
clipping might have changed, but I'm unable to reproduce the look on my computer... I'll go through the old clipping specs and see if I can find anything. but I might need you to verify... |
This is on my Ubuntu machine. |
Can you check with the CRAN version and see if the look is ok there? |
Hm, it looks different depending on the R version and graphics device. This is probably too much information, but here you go. For each of the code snippets, I'll include two screenshots: one for ggplot2 2.1.0 and one for the latest dev version, 2.1.0.9000 (1ee809a). Calling
|
Thanks - I'll dig into it tomorrow |
The darker lines are my doing, so that they match the ticks. But the clipping definitely changed. For completeness here is the aspect with 2.1.0 (on left) and current master (on right) on OS X. The clipping of the sides of the panel was already a bit "too much" in 2.1.0 but not as noticeable because the color was lighter. However, the outline of the facets used to be clipped too. And it was when I tested the color change in #1679 (see the second plot). With the outline not clipped, the aspect is indeed weird. This is also a problem with |
Ok, it's clear that this is my wrongdoing :-) |
That said, if you could clip the content of the background panel + the grid lines (which need to be clipped of course) but not the outline of the panel or axes, it would make it easier to design themes. For example matching the thickness of the axes with the thickness of the grid lines is difficult/impossible now because axes are clipped and grid lines are not (basically one has to make axes twice as thick and even then, it is not an exact match). It will also help get a smoother, more homogeneous look in various rendering engines. As Winston's examples above show, with rendering engines which favour sharpness (i.e. not OS X's but nearly all others), the clipped lines can appear of different width depending how the rendering engine rounds the number of pixels. Finally, it also makes the outline of facet labels very square (because it is clipped) when one might want a smoother look, with rounded angles. This would require some tweaking of the themes to keep the current aspect but we could easily do this in concert. |
@wch Can you check out #1789. I did make an error with the new strip constructors so they weren't clipped, but apart from that I could not elicit any change by making stacking and clipping more explicit - I think the panel-border effect is simply an artefact of the new theme settings by @jiho and bad rendering... |
The panels have a bit of a raised, 3-D look to them. Also, the thinner/lighter lines on the left side look a bit off when the facet label box has a darker/heavier line.
The text was updated successfully, but these errors were encountered: