Hi,

I just committed some changes to deal with these comments.  Responses
below.

Cheers, David

On Thu, 2008-07-17 at 15:16 -0500, John Hunter wrote:

>     def __init__(self, fig, eventslist=()):
>         self.fig = fig
>         assert isinstance(eventslist, tuple), "Requires a tuple of
> event name strings"
>         self.eventslist = eventslist
> 
> I would probably write a cbook method is_sequence_of_strings and just
> call that since it will be more readable and reusable...
> 

Method added to cbook.

> I notice there are some residual print statements in the code -- these
> should be replaced by the verbose handler in matplotlib/__init__.py,
> eg in
> 
>                 if timeout > 0 and counter > timeout/0.01:
>                     print "Timeout reached";
>                     break;
> 
> and
>             if self.verbose:
>                 print "input %i: %f,%f" % (len(self.clicks),
>                                     event.xdata, event.ydata)
> 
> and others in contour.py
> 
> You can replace these with
> 
>   import matplotlib
>   matplotlib.verbose.report('something')
> 
> and
> 
>   matplotlib.verbose.report('some nitty gritty details', 'debug')
> 
> There should be no prints in mpl.
> 

Fixed.

> In contour.py, we have
> 
>         xmax = np.amax(np.array(linecontour)[:,0])
>         xmin = np.amin(np.array(linecontour)[:,0])
>         ymax = np.amax(np.array(linecontour)[:,1])
>         ymin = np.amin(np.array(linecontour)[:,1])

I noticed these previously, but didn't touch them as this is in the part
of the code that is somewhat mysterious to me.  linecontour should
always be an array (at least the linecontours in a Path), so I don't see
much point in forcing it to array.  I have removed these and several
other np.array or np.asarray calls that seemed extraneous to me.  If
desired, I can include a single np.array call, but I don't think it is
required.

Thanks,
David

-- 
**********************************
David M. Kaplan
Charge de Recherche 1
Institut de Recherche pour le Developpement
Centre de Recherche Halieutique Mediterraneenne et Tropicale
av. Jean Monnet
B.P. 171
34203 Sete cedex
France

Phone: +33 (0)4 99 57 32 27
Fax: +33 (0)4 99 57 32 95
http://www.ur097.ird.fr/team/dkaplan/index.html
**********************************



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to