Re: [matplotlib-devel] clabel improvements

2008-07-24 Thread Ryan May
David Kaplan wrote: >> * Using an empty list in a python kwarg as the default is a gotcha, as in >> >> def calc_label_rot_and_inline( self, slc, ind, lw, lc=[], spacing=5 ): >> >> The reason is that if the function mutates the list, this often leads >> to unintended consequences as the list is

Re: [matplotlib-devel] clabel improvements

2008-07-24 Thread John Hunter
On Thu, Jul 24, 2008 at 9:32 AM, David Kaplan <[EMAIL PROTECTED]> wrote: >> * avoid the ternary operator, as in >> >> # Figure out label rotation. >> rotation,nlc = cs.calc_label_rot_and_inline( >> slc, imin, lw, lc if self.inline else [], >>

Re: [matplotlib-devel] clabel improvements

2008-07-24 Thread David Kaplan
Hi, I made the suggested fixes. Comments below: On Thu, 2008-07-24 at 08:38 -0500, John Hunter wrote: > On Thu, Jul 24, 2008 at 7:31 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > > > I committed the changes to clabel (r5830). > > Hey David -- thanks for these fixes. I noticed a couple of thin

Re: [matplotlib-devel] clabel improvements

2008-07-24 Thread John Hunter
On Thu, Jul 24, 2008 at 7:31 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > I committed the changes to clabel (r5830). Hey David -- thanks for these fixes. I noticed a couple of things I want to comment on * avoid the ternary operator, as in # Figure out label rotation.

Re: [matplotlib-devel] clabel improvements

2008-07-24 Thread David Kaplan
Hi, I committed the changes to clabel (r5830). For the attribute renaming, I think we can safely rename most of them. In my opinion, the only ones that users might use are .cl, .cl_xy and .cl_cvalues. The clabel function creates these just before finishing from their more appropriately named ve

Re: [matplotlib-devel] clabel improvements

2008-07-23 Thread Gael Varoquaux
On Wed, Jul 23, 2008 at 09:14:46AM -0500, John Hunter wrote: > > Related: while I am digging around in there, now is probably the moment > > for me to integrate Paul Kienzle's comments on start/stop_event_loop in > > FigureCanvasBase, etc. I am not sure there is a consensus on this. I > > am curr

Re: [matplotlib-devel] clabel improvements

2008-07-23 Thread Ryan May
John Hunter wrote: >> I have tested all the changes against the existing pylab_examples and >> things work fine. Nonetheless, since lots of things have been changed, >> I haven't committed them for fear of interfering with the release. >> Instead, I am attaching the patch set. If I get the green

Re: [matplotlib-devel] clabel improvements

2008-07-23 Thread Eric Firing
John Hunter wrote: > On Wed, Jul 23, 2008 at 6:21 AM, David Kaplan <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Well, I now know more than I ever wanted to about clabel. I decided to >> improve a bit on the inlining and ended up rewriting it. For automatic >> label placement, I basically use the exist

Re: [matplotlib-devel] clabel improvements

2008-07-23 Thread John Hunter
On Wed, Jul 23, 2008 at 6:21 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > Hi, > > Well, I now know more than I ever wanted to about clabel. I decided to > improve a bit on the inlining and ended up rewriting it. For automatic > label placement, I basically use the existing algorithm for determin

[matplotlib-devel] clabel improvements

2008-07-23 Thread David Kaplan
Hi, Well, I now know more than I ever wanted to about clabel. I decided to improve a bit on the inlining and ended up rewriting it. For automatic label placement, I basically use the existing algorithm for determining label location, but have replaced existing code for determining the angle of r