-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
Overwide heatmap bins coloring areas that shouldn't be colored #2249
Comments
Bump. This issue makes heatmaps hard to interpret. |
Makie supports irregular heatmaps, and the vector conversion just looks at all the center values you're passing and assembles them into a grid. Makie does not care if the grid is regular or not. You would need to add a 3 with NaN value and then the grid would be like you want it. We can't really guess if a grid irregularity is on purpose or not. |
In this example, in the left facet/pane, the using DataFrames, AlgebraOfGraphics, CairoMakie
n = 1000
df = DataFrame(x=rand('A':'G',n), y=rand('a':'m',n), z=rand(1:100,n), c=rand('!':'"',n))
d = combine(groupby(df, [:x,:y,:c]), :z => sum)
# Remove values for one facet and row.
subset!(d, [:x,:y,:c,:z_sum] => ByRow((x,y,c,z)-> !((c == '!') && (y == 'i'))))
ll = (data(d) * mapping(:x,:y,:z_sum; layout=:c) * (visual(Heatmap) * mapping()))
draw(ll) Creating cells to fill with NaN is ok as a workaround but I won't remember to do that (or want to) and I'll misinterpret my plots. The problem is that there is a tick on the axis but it doesn't mean there is data there. In both of these cases, it hallucinates an axis tick: in the So there is a tension between
I think there ought to be a way to resolve this. Maybe in the |
Ok yes I agree this is problematic, but to me it's an AlgebraOfGraphics problem. It should probably add the missing categories in each heatmap when it links the facets. |
heatmap([1, 2, 4, 5], [1, 2, 3, 4], rand(4)) Would it be good to have a way to specify a different partitioning of the x space, e.g. if I want equal-width columns instead of proportional columns? I think that's what piever was suggesting. eg |
Closing this a wont-fix. If you want a gap at x = 3 you either have to to use 1:5 with a NaN column (?) in the matrix or split your data into two heatmaps. |
From MakieOrg/AlgebraOfGraphics.jl#407.
I reported
@piever said
The text was updated successfully, but these errors were encountered: