Merge pull request #1931 from apalugniok/gr-titles3d

Add 3D axes guides for GR (Fixes #743)
This commit is contained in:
Josef Heinen 2019-02-27 12:25:18 +01:00 committed by GitHub
commit 8f381e2611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -925,7 +925,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
GR.settextalign(halign, GR.TEXT_VALIGN_TOP)
gr_text(xpos, viewport_subplot[4], sp[:title])
end
if is3d(sp)
gr_set_font(guidefont(xaxis))
GR.titles3d(xaxis[:guide], yaxis[:guide], zaxis[:guide])
else
if xaxis[:guide] != ""
gr_set_font(guidefont(xaxis))
if xaxis[:guide_position] == :top || (xaxis[:guide_position] == :auto && xaxis[:mirror] == true)
@ -948,6 +951,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
gr_text(viewport_subplot[1], gr_view_ycenter(), yaxis[:guide])
end
end
end
GR.restorestate()
gr_set_font(tickfont(xaxis))