python - How to display images using different color maps in different figures in matplotlib? -


i want display images using different color maps in different figures.

following code displays image 2 different windows same color map

   import scipy.misc    pylab import *     = scipy.misc.imread('lena.jpg')    figure(1)    image = mean(a,axis=2)    imshow(image)    #if call show() here 1 window displayed    gray() #change default colormap gray    figure(2)    imshow(image)    show() 

i wondering if can please me.

thanks lot.

you can pass cmap argument imshow function. @ http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow


Comments

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -