fix limits in GR image

This commit is contained in:
Daniel Schwabeneder 2020-11-12 12:48:49 +01:00
parent ac8e1d7f21
commit 5d26068eae

View File

@ -1578,17 +1578,15 @@ function gr_add_series(sp, series)
sp[:legend] = :none sp[:legend] = :none
GR.gr3.clear() GR.gr3.clear()
dmin, dmax = GR.gr3.volume(y.v, 0) dmin, dmax = GR.gr3.volume(y.v, 0)
elseif st in (:heatmap, :image) elseif st === :heatmap
if !ispolar(series) if !ispolar(series)
# `z` is already transposed, so we need to reverse before passing its size. # `z` is already transposed, so we need to reverse before passing its size.
x, y = heatmap_edges(x, xscale, y, yscale, reverse(size(z))) x, y = heatmap_edges(x, xscale, y, yscale, reverse(size(z)))
end end
if st === :heatmap
gr_draw_heatmap(series, x, y, z, clims) gr_draw_heatmap(series, x, y, z, clims)
else elseif st === :image
gr_draw_image(series, x, y, z, clims) gr_draw_image(series, x, y, z, clims)
end end
end
# this is all we need to add the series_annotations text # this is all we need to add the series_annotations text
anns = series[:series_annotations] anns = series[:series_annotations]