You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I identified a problem with stacked bar charts, whenever some of the bars are very thin compared to the others in a stacked barchart. Sometimes the thin bars are not visible in the stack, and it simply happens randomly at images with different heights. Here are a couple of example images and the reprex is given below for various different image heights.
Thank for the report!
As these bars essentially have sub-pixel heights, I think this is just a limitation of the anti-aliasing capabilities of graphics devices.
You can use ragg::agg_png(snap_rect = FALSE) to have a png device that anti-aliases this correctly for rectangles that don't snap to the pixel grid.
In any case, there isn't anything that ggplot2 can do about this, as ggplot2 builds the graphics on top of {grid} which then hands it do the graphics device so there is no direct control. For this reason, I'll close this issue.
I identified a problem with stacked bar charts, whenever some of the bars are very thin compared to the others in a stacked barchart. Sometimes the thin bars are not visible in the stack, and it simply happens randomly at images with different heights. Here are a couple of example images and the reprex is given below for various different image heights.
First 2 stacks have the red bar visible:
Stacks 1 and 3 have the red bar visible:
All 3 stacks have the red bar visible:
Created on 2025-01-09 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: