SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Jon F. <jo...@dr...> - 2006年02月28日 16:55:08
I've been working on a matplotlib embedded gtk app that updates an image
(made with imshow) with a colorbar and I've noticed that although I can
update the image with an image.set_data(new_array) that the colormapping
and colorbar don't change. Is this the intended behaviour? I guess it
makes perfect sense if the image doesn't change much. 
I am using a figure.clear() and a completely new axes.imshow() each time
I redraw the plot. 
-- Jon
-- 
.*. Dr. Jon R. Fox
..* http://www.drfox.com
*** jo...@dr...
From: Humufr <hu...@ya...> - 2006年02月28日 18:45:19
I don't know if it something wanted but it's very useful for me. For 
example sometime to improve the contrast between two values, I plot the 
log of the image but I don't want the value of the colorbar in log but 
linear or another sample (problably not good but I didn't find any other 
way to do it), I want plot the data from yellow to red, I'm using the 
hot colormat to do it but I didn't find any way to do the opposite so I 
began by plotting the data with the normal value, I plot the colorbar 
and I plot another time the opposite of the data, after with gimp I turn 
the colorbar and my scale is ok.
It's bad and dirty but it's working. I didn't find any otther way to do 
it properly.
N.
Jon Fox wrote:
> I've been working on a matplotlib embedded gtk app that updates an image
> (made with imshow) with a colorbar and I've noticed that although I can
> update the image with an image.set_data(new_array) that the colormapping
> and colorbar don't change. Is this the intended behaviour? I guess it
> makes perfect sense if the image doesn't change much. 
>
> I am using a figure.clear() and a completely new axes.imshow() each time
> I redraw the plot. 
>
> -- Jon
>
>
> 
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /