[Tutor] plotting in python
waynejwerner at gmail.com
Wed Nov 30 23:30:26 CET 2011
On Wed, Nov 30, 2011 at 3:08 PM, stm atoc <stm.at.oc at googlemail.com> wrote:
> Hi there,
> I have a question regarding plotting with Python.
> ValueError: x and y must have same first dimension
It looks like something is wrong with the data that you're trying to plot.
Specifically, the data that you're trying to plot has the wrong dimensions
(like it says).
# 2d space:
x = [(1, 1), (2, 2), (3,3)]
y = [(1,1,1), (2,2,2), (3,3,3)]
x is a series of points in 2 dimensions, and y is a series in 3. If your
data really is supposed to look like that then you'll need to pad or trim
the data so you've got the correct dimensions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor