-
-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Labels
Description
- what version of Makie are you running? (
]st -m Makie) v0.24.8 - can you reproduce the bug with a fresh environment ? (
]activate --temp; add Makie) - What platform + GPU are you on? macos cpu
- Which backend are you using? (GLMakie, CairoMakie, WGLMakie, RPRMakie) CairoMakie
- Please provide an minimal example of the failing code. If the problem is with the visualization, please provide a picture or video of it.
Here is a small modification of the example from here:
using CairoMakie
f = Figure()
ax = Axis(f[1, 1])
centers_x = 1:5 # length 5
centers_y = 6:10 # length 5
data = reshape(1:30, 6, 5) # 6 x 5
heatmap!(ax, centers_x, centers_y, data) # no error
scatter!(ax, [(x, y) for x in centers_x for y in centers_y], color=:white, strokecolor=:black, strokewidth=1)
fI would want heatmap! to error as length(x) != size(data, 1).
The docs say:
Plots a heatmap as a collection of rectangles. x and y can either be of length i and j where (i, j)
is size(matrix), in this case the rectangles will be placed around these grid points like voronoi
cells. Note that for irregularly spaced x and y, the points specified by them are not centered
within the resulting rectangles.x and y can also be of length i+1 and j+1, in this case they are interpreted as the edges of the
rectangles.
but here x is size(matrix, 1) - 1, not +1.
Reactions are currently unavailable