From: Teemu R. <Tee...@he...> - 2005-02-07 21:43:29
|
Hi, I recently got matplotlib working on OSX (only agg so far) and am now trying to create a picture with two overlayed images so that only a certain range of values of the top-most figure are blended with the bottom one. The first image would be plotted with the gray palette: im_bottom=figimage(bottom_data,xo=0, yo=0,cmap=cm.gray) The second image would be in colors: im_top=figimage(top_data,xo=0, yo=0,cmap=cm.hot) I would like to 'threshold' the top figure so that only values, say, greater than 30 are plotted with 'hot' colors and elsewhere the gray im_bottom is shown (without blending it with the colors of im_top). I was hoping that I could do something easy like this: im_top=figimage(where(less(data_top,30),do_not_plot_this_value,data_top),xo=0,yo=0,cmap=cm.hot,alpha=0.5) How to do this? Do I have to combine the RGB values of the two images 'manually'? Cheers, -- Teemu Rinne |