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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -