On Mon, Aug 3, 2009 at 11:37 AM, Josh Hemann<jhem...@vni.com> wrote:
>
> I am submitting two possible gallery additions for bar charts and boxplots.
> The existing examples are good, but being relatively new to matplotlib I had
> to learn quite a bit to enhance these charts to fit my needs. Learning is
> good of course, but maybe these "more complete" examples will help others to
> get up to speed more quickly. Likewise, I am sure there are experts out
> there who can comment on better, more Pythonic ways of doing things, so
> please feel free to offer advice.
>
>
>
>
> http://www.nabble.com/file/p24793965/barchartdemo.png
>
>
> http://www.nabble.com/file/p24793965/boxplotdemo.png


Great I added these to the release branch.  Please attach examples
going forward, since the browser wrapped a lot of code that I had to
clean up.  Also, there was one (if x else y) usage that is not
supported in python2.4, which we still support, so I rewrote that.
Finally, I had some trouble with the get_xdata().data call,

jo...@udesktop191:mpl99> python examples/pylab_examples/boxplot_demo2.py
Traceback (most recent call last):
  File "examples/pylab_examples/boxplot_demo2.py", line 85, in ?
    plt.plot([np.average(med.get_xdata().data)], [np.average(data[i])],
  File 
"/home/titan/johnh/dev/lib/python2.4/site-packages/numpy/lib/function_base.py",
line 616, in average
    avg = a.mean(axis)
TypeError: unsupported operand type(s) for /: 'buffer' and 'float'

but just replacing that with get_xdata() seemed to work fine.
Attached are the cleaned up examples I committed

Attachment: barchart_demo2.py
Description: Binary data

Attachment: boxplot_demo2.py
Description: Binary data

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to