Christopher Barker wrote:
> Eric Firing wrote:
>   
>> Even without the automatic-redraw difference, the OO interface requires 
>> more typing, and more mental record-keeping, than the pylab interface.
>>     
>
> Yes, but I don't think that's inherent in an OO interface, it's just 
> that the quickie utilities are missing from the current OO interface.
>
> oh, and it's not mental record keeping -- it's explicit record keeping, 
> which is why I like it:
>
> F1 = OOlab.Figure()
> F2 = OOlab.Figure()
>
> Isn't that better than trying to remember which is the current figure?
>
>   
>> Typing "plot(x,y)" is easier to do and remember than creating a figure, 
>> adding axes, and then typing "ax1.plot(x,y)".
>>     
>
> Why couldn't plot(x,y) create and return a figure object? Or an axis 
> object? -- I haven't thought it out too much yet.
>   

Chris:  In the pylab interface, figure() returns a figure instance and 
plot(x,y) returns a list of Line2d instances.

 >>> from pylab import *
 >>> l = plot([1,2,3])
 >>> l
[<matplotlib.lines.Line2D instance at 0x3dcf738>]
 >>> f = figure()
 >>> f
<matplotlib.figure.Figure instance at 0x3dcf710>
 >>>

I guess I agree with Eric, I don't really see much benefit for the OO 
interface for interactive use.


-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
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