Skip to content

Commit

Permalink
fix heatmapshader for ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Oct 1, 2024
1 parent 94b7273 commit 6f96ba0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/basic_recipes/datashader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ end

function convert_arguments(::Type{Heatmap}, x, y, image::Resampler)
x, y, img = convert_arguments(Heatmap, x, y, image.data)
return (x, y, Resampler(img))
return (EndPoints{Float32}(x...), EndPoints{Float32}(y...), Resampler(img))
end

function empty_channel!(channel::Channel)
Expand Down
7 changes: 7 additions & 0 deletions test/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ using Makie.MakieCore: plotfunc, plotfunc!, func2type

end

@testset "Heatmapshader with ranges" begin
hm = Heatmap(((0, 1), (0, 1), Resampler(zeros(4, 4))), Dict{Symbol,Any}())
hm.converted[1][] isa Makie.EndPoints{Float32}
hm.converted[2][] isa Makie.EndPoints{Float32}
hm.converted[3][].data == Resampler(zeros(4, 4)).data
end

@testset "changing input types" begin
input = Observable{Any}(decompose(Point2f, Circle(Point2f(0), 2f0)))
f, ax, pl = mesh(input)
Expand Down

0 comments on commit 6f96ba0

Please sign in to comment.