lol.

Finally found the magic parameter.  borderaxespad.

import pylab,matplotlib

pylab.plot([1,2,3,4,5],[1,2,3,4,5],"bo",label="data")
ax  = pylab.gca()

pylab.legend(bbox_to_anchor=(0,1),loc=2,borderaxespad=0)

# draw an X to make sure of coordinates.
ax.lines.append(matplotlib.lines.Line2D((0,1),(0,1),transform=ax.transAxes,color='blue'))
ax.lines.append(matplotlib.lines.Line2D((0,1),(1,0),transform=ax.transAxes,color='red'))

pylab.show()

I don't know how I missed that parameter after reading the docs 100 times. :(

Sorry for bothering the list with something so trivial.  I had a major
"can't see the forest through the trees" moment.


-- 
Daniel Hyams
dhy...@gmail.com

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to