From 94c0957e11f3101c7af8881be70382cf35f1ce69 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 16 Oct 2017 18:04:46 +0200 Subject: [PATCH] draw colorbar in the end --- src/backends/gr.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 9d9d6b32..96ca08f4 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1128,13 +1128,6 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) GR.drawimage(xmin, xmax, ymax, ymin, w, h, rgba) end - # draw the colorbar - if cmap && st != :contour # special colorbar with steps is drawn for contours - gr_set_line(1, :solid, yaxis[:foreground_color_axis]) - GR.settransparency(1) - gr_colorbar(sp, clims) - end - # this is all we need to add the series_annotations text anns = series[:series_annotations] for (xi,yi,str,fnt) in EachAnn(anns, x, y) @@ -1142,6 +1135,13 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) gr_text(GR.wctondc(xi, yi)..., str) end + # draw the colorbar + if cmap && st != :contour # special colorbar with steps is drawn for contours + gr_set_line(1, :solid, yaxis[:foreground_color_axis]) + GR.settransparency(1) + gr_colorbar(sp, clims) + end + GR.restorestate() end