2009/12/9 Jae-Joon Lee :
> vp = leg._legend_box._children[-1]._children[0]
> for c in vp._children:
>c._children.reverse()
> vp.align="right"
That's perfect, thank you very much :)
— Jason
--
Return on Information:
G
plot([1,2,3], label="Label 1")
plot([2,1,3], label="Long Label 2")
leg = legend()
# swap_and_right_align_legend
vp = leg._legend_box._children[-1]._children[0]
for c in vp._children:
c._children.reverse()
vp.align="right"
draw()
Does this close to waht you want?
-JJ
On Wed, Dec 9, 2009
Hi,
Is it possible to right align the text and line samples in a legend box?
That is, instead of:
--- First plot
--- Second plot
...you get:
First plot ---
Second plot ---
(with a fixed width font, that last one displays the right edges of
the text perfectly aligned).
Cheers,
Jason
-