Skip to content

Commit

Permalink
gr: fix legend title align (#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Nov 27, 2022
1 parent 9577dee commit ce9c8ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backends/gr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ function gr_add_legend(sp, leg, viewport_area)
gr_set_line(1, :solid, sp[:legend_foreground_color], sp)
GR.drawrect(xs..., ys...) # drawing actual legend width here
if (ttl = sp[:legend_title]) !== nothing
gr_set_font(legendtitlefont(sp), sp; halign = :center, valign = :center)
gr_set_font(legendtitlefont(sp), sp)
_debug[] && gr_legend_bbox(xpos, ypos, leg)
gr_text(xpos - leg.pad - leg.space + 0.5leg.textw, ypos, string(ttl))
if vertical
Expand Down

0 comments on commit ce9c8ed

Please sign in to comment.