On Mon, Jul 23, 2012 at 08:38:07PM -0400, Benjamin Root wrote:
> On Monday, July 23, 2012, Eric Firing wrote:
> 
> > On 2012/07/23 11:43 AM, Damon McDougall wrote:
> > > Hello all,
> > >
> > > So, as per Philip's suggestion
> > > (https://github.com/matplotlib/matplotlib/pull/737) I've started
> > > encapsulating fplot functionality into a class. The point of this is so
> > > that the user can call either of the following:
> > >
> > > FPlot_instance = ax.fplot(f, [x0, y0, x1, y1])
> > > ax.fplot(FPlot_instance, ...)
> >
> > The second of these seems odd to me; I would expect FPlot_instance to
> > have a __call__ method, so the normal use of an existing instance would be
> >

That is awesome! I didn't know the __call__ method existed! That's a
much better way of doing it. I love Python.

> >
> > FPlot_instance(...)
> >
> > Also, regarding the second argument in the first form: I would think it
> > more natural to split it up into a required [x0, x1] and an optional
> > [y0, y1], with autoscaling if it is not provided.
> >
> > Eric
> 
> 
> Agreed, it is a bit odd/awkward, and I also agree about autoscaling.
> 
> With the whole viewlims callbacks, make sure you have the class disconnect
> itself upon removal, such as through cla().
>

So are you suggesting autoscaling over a callback?

> l <https://lists.sourceforge.net/lists/listinfo/matplotlib-devel>
> Cheers!
> Ben Root

-- 
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to