From 47c51b28c17e0f02c60daec9256fbfa55b3f9cf1 Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Mon, 19 Jun 2017 18:06:08 -0700 Subject: [PATCH] gr: heatmaps now respect xlim/ylim specifications Fixes https://github.com/JuliaPlots/Plots.jl/issues/942 --- src/backends/gr.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index feb2e5eb..4d5d3dd4 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -886,7 +886,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) round(Int, blue(c) * 255) << 16 + round(Int, green(c) * 255) << 8 + 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) elseif st in (:path3d, :scatter3d)