Skip to content

Commit 0916a17

Browse files
committed
Make sure the plot data in the recipe stays a plain Array and is not a lazy DiskArrayengine wrapper
1 parent 547f83c commit 0916a17

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ext/PyramidSchemeMakieExt.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ function Makie.plot!(plot::Heatmap{<: Tuple{<: Pyramid}})
9191
datalimit = switchkeys(data_limits_ext, pyramid_ext)
9292

9393
if intersects(pyramid_data_ext, data_limits_ext)
94-
# @show data_limits_ext
95-
return (Ref{DD.AbstractDimMatrix}(miss2nan.(
96-
selectlevel(pyramid, datalimit, target_imsize = pixel_widths)
97-
)),)
94+
# This rebuild is necessary because YAXArray broadcast makes the data a DiskArrayEngine type
95+
# This happens also for in-memory arrays see YAXArray issue #579
96+
intersectdata = selectlevel(pyramid, datalimit, target_imsize = pixel_widths)
97+
intersectdata = DD.rebuild(intersectdata, data=miss2nan.(intersectdata.data))
98+
return (Ref{DD.AbstractDimMatrix}(intersectdata),)
9899
else
99100
return nothing # nothing changed so the downstream computation is not marked dirty
100101
end

0 commit comments

Comments
 (0)