All,

I am having difficulty with a line on:  http://scipy.org/LoktaVolterraTutorial

Here are the lines:

values  = linspace(0.3, 0.9, 5)

vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values)))

First of all, I can find no reference to autumn_r in the Matplotlib 
documentation. Also, using Aptana (eclipse), PyDev complains about the vcolors 
line with:  

Undefined variable from import: autumn_r        Lotka.py        /scipy/src/pkg  
line 44 PyDev Problem

Secondly, I am used to using colormaps in Matlab, but not so  much in 
Matplotlib. In Matlab, g=grey(256) produces an 256x3 matrix and each row is 
indexed by the numbers 1 through 256. Thus, if you have an image and pixel has 
a value 124, then row 124 gives an rgb triple that is used to color the pixel. 

However, in the case of vcolors = p.cm.autumn_r(linspace(0.3, 1., 
len(values))), I'm really not sure what is going on. The 
linspace(0.3,1,len(values)) produces len(values) equally spaced numbers from 
0.3 to 1. Now, how is autumn_r(array([ 0.3  ,  0.475,  0.65 ,  0.825,  1.   ])) 
make any sense?

Thanks.

David.



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to