matplotlib - 'module' object has no attribute 'cmap' in cubehelix python -


i'm trying use cubehelix in python i've been getting simple problems don't think should showing up. code i'm using following:

import matplotlib.pyplot plt import numpy np import cubehelix

cx1 = cubehelix.cmap(reverse=true) alplot = plt.imshow(rtotal_rotated,vmax=1100,extent[-21,19,23,-17],cmap=cx1)

however following error comes when run code:

attributeerror: 'module' object has no attribute 'cmap'

i know can't right since i'm following code tutorial http://www.ifweassume.com/2014/04/cubehelix-colormap-for-python.html

so i'm not sure why it's breaking.

very script imports itself, i.e. script named cubehelix.py. so, if have file named cubehelix.py in current working directory, rename my_cubehelix.py , try again.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -