From: Christopher B. <Chr...@no...> - 2008-07-16 22:35:15
|
Oz Nahum wrote: > I still get this error > Traceback (most recent call last): > File "yael.py", line 24, in <module> > x = x.transpose() > AttributeError: 'tuple' object has no attribute 'transpose' as someone suggested, you really want to read up on numpy -- the transpose method is a method of numpy arrays. numpy arrays are kind of like Matlab matrixes, only more powerful and flexible. MPL is using numpy arrays inside anyway. > and one more thing I discovered. the Data points that are ploted are not > temperature... this are the depth:distance coordinates. if you have a contour plot, you have depth,distance as your x,y coordinates, with the temp value shown by the contours How did you expect to plot temp on top of that? > I am a lost case about reading tutorial at the moment. > I am in a middle of a very intense course, and they expect us to do > crazy stuff with matlab. so it's either that or solving with python. Either way, there is not choice but to learn a bit first! As hard as this is, you're right trying to do all your computation and plotting with with a spreadsheet is a nightmare -- you'll be glad you've learned it! Have you read the MPL docs -- there's a lot of good, simple examples in there: http://matplotlib.sourceforge.net/users_guide_0.98.1.pdf -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |