Dear All,

I am quite new to matplotlib and facing some trouble using boxplots.

I'd like to plot two boxes (different length of data) in one plot, from 
the docs
I understood:

from pylab import *

data = [[1.1, 2.1, 3.1], [1, 2.1]]
boxplot(data, positions=[1,2])

but this gives me:
Traceback (most recent call last):
  File "boxplot_demo1.py", line 5, in <module>
    data = array([[1.1, 2.1, 3.1], [1, 2.1]])
  File 
"D:\APPS\python25\lib\site-packages\numpy\oldnumeric\functions.py", line 
79, in array
    return mu.array(sequence, dtype, copy=copy)
ValueError: setting an array element with a sequence.

The call succeeds if all entries have the same length, but then
matplotlib seems to use data from rows, not columns so that
Ihave to do:

boxplot(transpose(data), positions=[1,2])

Could you point me to what I do wrong? I need especially
the different data length.

Thank you
Gerhard

I am using python 2.5 matplotlib 0.87.7 on windows XP with numpy 1.0.1
(on older installation with python 2.4 and older numpy has the same issue.



****************************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited.
E-mail messages are not necessarily secure.  Renesas does not accept
responsibility for any changes made to this message after it was sent.
Please note that this email message has been swept by Renesas for
the presence of computer viruses.
****************************************************************************


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to