Merge pull request #1181 from daschw/colorbar
Fix GR annotations with colorbar (fix #1179)
This commit is contained in:
commit
e8f6e7b56c
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user