fix gr image lims
This commit is contained in:
parent
0768c8a658
commit
20a10fcf7d
@ -1060,11 +1060,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
if st == :pie
|
if st == :pie
|
||||||
draw_axes = false
|
draw_axes = false
|
||||||
end
|
end
|
||||||
if st == :heatmap
|
if st in (:heatmap, :image)
|
||||||
outside_ticks = true
|
outside_ticks = true
|
||||||
for ax in (sp[:xaxis], sp[:yaxis])
|
|
||||||
v = series[ax[:letter]]
|
|
||||||
end
|
|
||||||
x, y = heatmap_edges(series[:x], sp[:xaxis][:scale], series[:y], sp[:yaxis][:scale], size(series[:z]))
|
x, y = heatmap_edges(series[:x], sp[:xaxis][:scale], series[:y], sp[:yaxis][:scale], size(series[:z]))
|
||||||
xy_lims = x[1], x[end], y[1], y[end]
|
xy_lims = x[1], x[end], y[1], y[end]
|
||||||
expand_extrema!(sp[:xaxis], x)
|
expand_extrema!(sp[:xaxis], x)
|
||||||
@ -1786,8 +1783,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
|
|
||||||
elseif st == :image
|
elseif st == :image
|
||||||
z = transpose_z(series, series[:z].surf, true)'
|
z = transpose_z(series, series[:z].surf, true)'
|
||||||
|
x, y = heatmap_edges(series[:x], sp[:xaxis][:scale], series[:y], sp[:yaxis][:scale], size(z))
|
||||||
w, h = size(z)
|
w, h = size(z)
|
||||||
xmin, xmax = ignorenan_extrema(series[:x]); ymin, ymax = ignorenan_extrema(series[:y])
|
xmin, xmax = ignorenan_extrema(x)
|
||||||
|
ymin, ymax = ignorenan_extrema(y)
|
||||||
rgba = gr_color.(z)
|
rgba = gr_color.(z)
|
||||||
GR.drawimage(xmin, xmax, ymax, ymin, w, h, rgba)
|
GR.drawimage(xmin, xmax, ymax, ymin, w, h, rgba)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user