|
70 | 70 | :aspect_ratio --> square_pixels |
71 | 71 | end |
72 | 72 |
|
73 | | - if get(plotattributes, :seriestype, :none) == :contourf |
| 73 | + |
| 74 | + if eltype(A) <: ColorTypes.Colorant |
| 75 | + index(x), index(y), parent(A) |
| 76 | + elseif get(plotattributes, :seriestype, :none) == :contourf |
| 77 | + A = replace_missing(A, missing) |
74 | 78 | clims = extrema(skipmissing(A)) |
75 | 79 | :levels --> range(clims[1], clims[2], length=20) |
76 | 80 | index(x), index(y), clamp.(A, clims[1], clims[2]) |
77 | 81 | else |
78 | 82 | :seriestype --> :heatmap |
| 83 | + A = replace_missing(A, missing) |
79 | 84 | index(x), index(y), parent(A) |
80 | 85 | end |
81 | 86 | end |
@@ -193,8 +198,7 @@ _prepare(d::Dimension) = d |> _maybe_shift |> _maybe_mapped |
193 | 198 | # Convert arrays to a consistent missing value and Forward array order |
194 | 199 | function _prepare(A::AbstractRaster) |
195 | 200 | reorder(A, DD.ForwardOrdered) |> |
196 | | - a -> permutedims(a, DD.commondims(>:, (ZDim, YDim, XDim, TimeDim, Dimension), dims(A))) |> |
197 | | - a -> replace_missing(a, missing) |
| 201 | + a -> permutedims(a, DD.commondims(>:, (ZDim, YDim, XDim, TimeDim, Dimension), dims(A)))# |> |
198 | 202 | end |
199 | 203 |
|
200 | 204 | function _subsample(A, max_res) |
|
0 commit comments