gr: heatmaps now respect xlim/ylim specifications

Fixes https://github.com/JuliaPlots/Plots.jl/issues/942
This commit is contained in:
Josef Heinen 2017-06-19 18:06:08 -07:00
parent dd2653968e
commit 47c51b28c1

View File

@ -886,7 +886,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
round(Int, blue(c) * 255) << 16 + round(Int, blue(c) * 255) << 16 +
round(Int, green(c) * 255) << 8 + round(Int, green(c) * 255) << 8 +
round(Int, red(c) * 255) ), colors) round(Int, red(c) * 255) ), colors)
GR.drawimage(xmin, xmax, ymax, ymin, length(x), length(y), rgba) w, h = length(x), length(y)
GR.drawimage(0.5, w + 0.5, h + 0.5, 0.5, w, h, rgba)
cmap && gr_colorbar(sp) cmap && gr_colorbar(sp)
elseif st in (:path3d, :scatter3d) elseif st in (:path3d, :scatter3d)