gr: added support for non-string legend labels
This commit is contained in:
parent
6a8f4caee3
commit
6d4717fc96
@ -1212,7 +1212,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
else
|
else
|
||||||
lab = series[:label]
|
lab = series[:label]
|
||||||
end
|
end
|
||||||
tbx, tby = gr_inqtext(0, 0, lab)
|
tbx, tby = gr_inqtext(0, 0, string(lab))
|
||||||
w = max(w, tbx[3] - tbx[1])
|
w = max(w, tbx[3] - tbx[1])
|
||||||
end
|
end
|
||||||
if w > 0
|
if w > 0
|
||||||
@ -1271,7 +1271,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
end
|
end
|
||||||
GR.settextalign(GR.TEXT_HALIGN_LEFT, GR.TEXT_VALIGN_HALF)
|
GR.settextalign(GR.TEXT_HALIGN_LEFT, GR.TEXT_VALIGN_HALF)
|
||||||
gr_set_textcolor(sp[:legendfontcolor])
|
gr_set_textcolor(sp[:legendfontcolor])
|
||||||
gr_text(xpos, ypos, lab)
|
gr_text(xpos, ypos, string(lab))
|
||||||
ypos -= dy
|
ypos -= dy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user