Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

imshow show nan as black

masked_array = np.ma.array (a, mask=np.isnan(a))
cmap = matplotlib.cm.jet
cmap.set_bad('white',1.)
ax.imshow(masked_array, interpolation='nearest', cmap=cmap)
Comment

PREVIOUS NEXT
Code Example
Python :: aes in django 
Python :: tweepy stream extended mode 
Python :: python remove xa0 
Python :: messe graphen erstellen python 
Python :: how to loadh5 file in python 
Python :: sns add spine 
Python :: pandas read csv read all columns except few columns 
Python :: for in range loop python 
Python :: next function with inherited list python 
Python :: python3 create dictionary 
Python :: convert days hours minutes into seconds python 
Python :: python wikipedia 
Python :: django abstractuser fields 
Python :: python print list 
Python :: python polymorphism 
Python :: create a pandas dataframe 
Python :: pandas sort values in groupby 
Python :: json.dump 
Python :: how to find duplicates in pandas 
Python :: if else usage python 
Python :: str in python 
Python :: pandas to excel 
Python :: Python list tutorial for beginners 
Python :: create a range of numbers in python 
Python :: slider python 
Python :: inheritance in python 
Python :: joining two lists in python using for loop 
Python :: round down py 
Python :: iteration over dictionary 
Python :: thresholding with OpenCV 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =