[SciPy-user] How to use pcolor and scatter plot in one image?

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Jun 1 05:36:33 EDT 2009


On Mon, Jun 01, 2009 at 11:26:38AM +0200, wierob wrote:
>    thanks for your help. Unfortunately, your example does not work for me.
>    The line

>  histo = np.histogram(z.ravel(), bins=r_[Z.ravel(),2*n**2])

>    produeces the following error message:

>  Traceback (most recent call last):
>    File "/mnt/VBoxShare/eg.py", line 15, in <module>
>      histo = np.histogram(z.ravel(), bins=r_[Z.ravel(),2*n**2])
>  NameError: name 'r_' is not defined

That was a typo: replace 'r_' by 'np.r_'.

Gaël

PS: IPython dev's: is there a pylab mode without the dreaded 
'from pylab import *'. We need to advertise such a workflow, rather the
'ipython -pylab' which polutes the namespace with almost 900 entries.



More information about the SciPy-User mailing list