diff --git a/src/conversions.jl b/src/conversions.jl index 4727f2715f5..aa87c2ae664 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -360,7 +360,7 @@ convert_arguments(ct::VertexGrid, x::AbstractMatrix, y::AbstractMatrix) = conver Takes one or two ClosedIntervals `x` and `y` and converts them to closed ranges with size(z, 1/2). """ -function convert_arguments(P::GridBased, x::RangeLike, y::RangeLike, z::AbstractMatrix) +function convert_arguments(P::GridBased, x::RangeLike, y::RangeLike, z::AbstractMatrix{<:Number}) convert_arguments(P, to_linspace(x, size(z, 1)), to_linspace(y, size(z, 2)), z) end diff --git a/test/conversions.jl b/test/conversions.jl index 4d27bf4de6f..be31c61cc7c 100644 --- a/test/conversions.jl +++ b/test/conversions.jl @@ -358,6 +358,9 @@ end @test convert_arguments(Heatmap, 0:10, v2, m3) == (collect(0f0:10f0), o2, o3) @test_throws ErrorException convert_arguments(Heatmap, m1, m2, m3) @test_throws ErrorException convert_arguments(Heatmap, m1, m2) + + # https://github.com/MakieOrg/Makie.jl/issues/3515 + @test convert_arguments(Heatmap, 1:8, 1:8, Array{Union{Float64,Missing}}(zeros(8, 8))) == (0.5:8.5, 0.5:8.5, zeros(8, 8)) end end