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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -