diff --git a/src/pipeline.jl b/src/pipeline.jl index 8dc475cb..e05f7791 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -357,9 +357,9 @@ end function _expand_subplot_extrema(sp::Subplot, d::KW, st::Symbol) # adjust extrema and discrete info if st == :image - w, h = size(d[:z]) - expand_extrema!(sp[:xaxis], (0,w)) - expand_extrema!(sp[:yaxis], (0,h)) + xmin, xmax = ignorenan_extrema(d[:x]); ymin, ymax = ignorenan_extrema(d[:y]) + expand_extrema!(sp[:xaxis], (xmin, xmax)) + expand_extrema!(sp[:yaxis], (ymin, ymax)) sp[:yaxis].d[:flip] = true elseif !(st in (:pie, :histogram, :bins2d, :histogram2d)) expand_extrema!(sp, d)