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 found a problem when combining geom_tile() with facet_wrap() when the y-axes of the different facets have fairly different ranges.
I expected that both facets exhibit the same kind of plot, but the one with the greatest range on the y-axis looks odd. Note that creating separate plots (i.e., without using facets but using a subset of the data) make the tiles work for both plots.
The issue here is that the inferred height of the tiles is computed once for the plot as a whole.
You could fix this by setting the appropriate height:
I'm glad there is a workaround to fix the issue, but isn't the default behavior problematic? I would have expected it to work out of the box.
@teunbrand I would vote for keeping this issue open, but don't feel strongly about it. Please do as you see fit. Maybe it'd be so much work to fix that it's not worth it.
It shouldn't be too much of a fuss to correct this. We did it in #5125 for barplots. To solve this problem we'd just have to calculate width as well as height.
I found a problem when combining
geom_tile()
withfacet_wrap()
when the y-axes of the different facets have fairly different ranges.I expected that both facets exhibit the same kind of plot, but the one with the greatest range on the y-axis looks odd. Note that creating separate plots (i.e., without using facets but using a subset of the data) make the tiles work for both plots.
Here is the code to reproduce the bug:
Created on 2024-03-04 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: