From 231e11715fea166474c46cc24fea2421afdb000d Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Sun, 28 May 2017 16:23:21 +0200 Subject: [PATCH] gr: fix problems with axes display --- src/backends/gr.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index fdaa6edc..d2e34390 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -661,7 +661,9 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) # spine (border) and tick marks gr_set_line(1, :solid, sp[:xaxis][:foreground_color_axis]) + GR.setclip(0) gr_polyline(coords(spine_segs)...) + GR.setclip(1) if !(xticks in (nothing, false)) # x labels @@ -676,7 +678,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) # use xor ($) to get the right y coords xi, yi = GR.wctondc(cv, (flip $ mirror) ? ymax : ymin) # @show cv dv ymin xi yi flip mirror (flip $ mirror) - gr_text(xi, yi + (mirror ? 1 : -1) * 2e-3, string(dv)) + gr_text(xi, yi + (mirror ? 1 : -1) * 1e-2, string(dv)) end end @@ -693,7 +695,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) # use xor ($) to get the right y coords xi, yi = GR.wctondc((flip $ mirror) ? xmax : xmin, cv) # @show cv dv xmin xi yi - gr_text(xi + (mirror ? 1 : -1) * 2e-3, yi, string(dv)) + gr_text(xi + (mirror ? 1 : -1) * 1e-2, yi, string(dv)) end end end