From c21f3810b9c0603b2c984565e75cee0b68ff28c6 Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Fri, 5 Jan 2018 10:51:41 +0000 Subject: [PATCH 1/2] Fix axis limits not cropping image. --- src/backends/gr.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index c499a8ad..ff9cf354 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1208,7 +1208,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) round(Int, green(c) * 255) << 8 + round(Int, red(c) * 255) ), z) end - GR.drawimage(xmin, xmax, ymax, ymin, w, h, rgba) + GR.drawimage(0, w, h, 0, w, h, rgba) end # this is all we need to add the series_annotations text From 27e2795576671a18be7110df49d2d248c052b37c Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Sat, 13 Jan 2018 16:18:08 +0000 Subject: [PATCH 2/2] Fix deprecation. --- src/backends/gr.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index ff9cf354..d10420eb 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1200,7 +1200,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) z = transpose_z(series, series[:z].surf, true)' w, h = size(z) if eltype(z) <: Colors.AbstractGray - grey = round(UInt8, float(z) * 255) + grey = round.(UInt8, float(z) * 255) rgba = map(c -> UInt32( 0xff000000 + Int(c)<<16 + Int(c)<<8 + Int(c) ), grey) else rgba = map(c -> UInt32( round(Int, alpha(c) * 255) << 24 +