On 3/7/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

> Upon working with this a little further, I discover that it works only in 
> full-view screen mode.  May be that's because xy is in pixel mode then?  When 
> I save it to a png file and then view it, the lines are wrong.

The default coords in the example I posted are in pixels -- when you
save, you are probably using a different DPI (this is configurable)
and so the lines have slightly different positions.  You can use
relative coords with the "transFigure" transform


from matplotlib.lines import Line2D
from pylab import figure, show, nx

fig = figure()
line = Line2D([0.1,0.2,0.3,0.4,0.5], [0.1,0.4, 0.35, 0.2, 0.5],
              linewidth=4, color='green', transform=fig.transFigure)
fig.lines.append(line)
show()

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to