try this:

list = numpy.array([0.66877509, 0.58785363, 0.32387598, 0.16877509,
0.48785363,
0.22387598, 0.96877509, 0.18785363, 0.52387598])

Pete

2008/8/8 stuartornum <[EMAIL PROTECTED]>

>
> Thanks again Pete for your help.
>
> I have numpy imported, and here is what my code looks like:
>
> ############################
> import matplotlib
> import numpy
> from numpy import *
> from pylab import *
>
> list = [0.66877509, 0.58785363, 0.32387598, 0.16877509, 0.48785363,
> 0.22387598, 0.96877509, 0.18785363, 0.52387598]
> newlist = list.reshape(3,3)
>
> pcolormesh(newlist)
> colorbar()
> savefig('colour.png')
>
> ############################
>
> However I get the error:
>
> Traceback (most recent call last):
>  File "colour.py", line 24, in <module>
>    newlist = list.reshape(3,3)
> AttributeError: 'list' object has no attribute 'reshape'
> ############################
>
> Just to note I get no error when numpy in imported.
>
> Thank you.
> --
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to