Legend: Space between text and upper border

Hi Darren,

You can set legend.pad in your rc settings, or you
can change the legend's pad property either when you
create it or after the fact

l=legend(['ok'], pad=0.5)
l.pad=1.5
draw()

But pad seems to have mainly an effect on the space
between the text and the left and right border. My
problem is that the upper border is to close to the
text, so it is very hard to read. Also the legend has
to be as small as possible, because there are up to
seven graphs displayed and I need the space fo the
graphs. So I need a solution which increases the space
between text and upper border without having an effect
on the space between text and right/left border.

Would you post an example that exposes the problem?

Here is a code-snippnet right from my program:

self.axes.plot(x_value, y_value, 'k-',
               label = labelLegend)

self.axes.legend(loc = 'best', pad = 0.1)
leg = self.axes.get_legend()
ltext = leg.get_texts()
setp(ltext, fontsize='x-small')

-- Till Wagner

···

--
"Since man's natural instincts lead him to sin, all men are sinners;
and all sinners go to hell. If everyone goes to hell, then you will
meet all your friends there. Heaven must be populated with some
rather strange creatures if all they lived for was to go to a place
where they can stump harps for eternity."- Anton Szandor LaVey
------------------------------------------------------------------------
Till Wagner <sacro_thaan@...9...>

___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Hi,

why don't you try to remove the legend frame?

self.axes.plot(x_value, y_value, 'k-', label = labelLegend)

self.axes.legend(loc = 'best', pad = 0.1)
leg = self.axes.get_legend()

leg.draw_frame(False)

You won't have any problem with the legend box anymore. but maybe, I didn't understand what you want...

Benoit

···

ltext = leg.get_texts()
setp(ltext, fontsize='x-small')

-- Till Wagner

--
"Since man's natural instincts lead him to sin, all men are sinners;
and all sinners go to hell. If everyone goes to hell, then you will
meet all your friends there. Heaven must be populated with some
rather strange creatures if all they lived for was to go to a place
where they can stump harps for eternity."- Anton Szandor LaVey
------------------------------------------------------------------------
Till Wagner <sacro_thaan@...9...>

___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Benoit Donnet
Université Pierre & Marie Curie (Paris VI)
Laboratoire LIP6 - Réseaux & Performances
8, rue du Capitaine Scott
75015 Paris
France
Phone: 00 33 (0)1 44 27 88 83
traceroute@...210... Project: http://trhome.sourceforge.net
Home Page: http://rp.lip6.fr/~donnet