From: Brad C. <bra...@so...> - 2009-06-23 14:14:30
|
Anyone? Am I way off the mark here? Thanks, Brad On Thu, 18 Jun 2009 14:41:03 -0300 Brad Chivari <bra...@so...> wrote: > SUBJECT: > Filtering out 0 bar height/width not working > > FILE: > matplotlib/ trunk/ matplotlib/ lib/ matplotlib/ axes.py > > PROBLEM: > xmin = np.amin(width[width!=0]) # filter out the 0 width rects > ymin = np.amin(height[height!=0]) # filter out the 0 height rects > > These aren't using proper python list comprehension and don't work as expected (for me anyway). > > SOLUTION: > Shouldn't they be something like: > xmin = np.amin([w for w in width if w != 0]) > ymin = np.amin([h for h in height if h != 0]) > > Once I changed them they seem to work properly. > > Thanks, > Brad > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel |