|
From: John [H2O] <was...@gm...> - 2008-10-24 15:53:04
|
Hello, I'm trying to get imshow to plot logarithmic data. I'm having some problems with the colorbar or data?? Note, I plot the max_dat value on the bottom of the figure, but it does not seem to correspond with the values in the plot??? Any ideas? Also, does anyone have some recommendations on how to better smooth the values, i.e. make the plume less 'grainy'? Thanks! My code is here: http://numpy.pastebin.com/m4ae6331a Example output is here: http://picasaweb.google.com/washakie/Temp#5260746894103850338 -- View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20152686.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Michael D. <md...@st...> - 2008-10-24 17:26:26
|
imshow doesn't handle logarithmic data. You'll want to use pcolor or pcolormesh instead. As for the graininess, unfortunately, pcolor and pcolormesh don't support any kind of interpolation. (imshow does, but it can only draw uniform data). Mike John [H2O] wrote: > Hello, > > I'm trying to get imshow to plot logarithmic data. I'm having some problems > with the colorbar or data?? > > Note, I plot the max_dat value on the bottom of the figure, but it does not > seem to correspond with the values in the plot??? Any ideas? Also, does > anyone have some recommendations on how to better smooth the values, i.e. > make the plume less 'grainy'? Thanks! > > My code is here: > http://numpy.pastebin.com/m4ae6331a > > Example output is here: > http://picasaweb.google.com/washakie/Temp#5260746894103850338 > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: John [H2O] <was...@gm...> - 2008-10-27 15:44:52
|
Okay, I can't find where I came up with the original solution to use imshow with custom clevs... I think it was a thread on this forum possibly, or in an example. But the point is that I recall there was some development talk about improving the handling of log data for this issue.... Does anyone have some pointers on these changes? I guess what you would suggest is that I interpolate the data, then use pcolor to plot it? Thanks. Michael Droettboom-3 wrote: > > imshow doesn't handle logarithmic data. You'll want to use pcolor or > pcolormesh instead. > > As for the graininess, unfortunately, pcolor and pcolormesh don't > support any kind of interpolation. (imshow does, but it can only draw > uniform data). > > Mike > > John [H2O] wrote: >> Hello, >> >> I'm trying to get imshow to plot logarithmic data. I'm having some >> problems >> with the colorbar or data?? >> >> Note, I plot the max_dat value on the bottom of the figure, but it does >> not >> seem to correspond with the values in the plot??? Any ideas? Also, does >> anyone have some recommendations on how to better smooth the values, i.e. >> make the plume less 'grainy'? Thanks! >> >> My code is here: >> http://numpy.pastebin.com/m4ae6331a >> >> Example output is here: >> http://picasaweb.google.com/washakie/Temp#5260746894103850338 >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20190337.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Michael D. <md...@st...> - 2008-10-27 16:19:36
|
The image is being plot in linear scale, while the scatter point is being plotted with log scale...? John [H2O] wrote: > I should add here also, this doesn't explain for me why the values are > different?? Thoughts on that mtter? > > Thanks!! > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: John [H2O] <was...@gm...> - 2008-10-27 16:53:03
|
Well, the image is being plotted using: ## create logorithmic scale range_max = int(pl.ceil(dat_max)) step = int(pl.ceil(range_max/10)) logspace = 10.**np.linspace(-1, 4.0, 20) # 50 equally-spaced-in-log points between 1.e-01 and 1.0e03 #plot# im = m.imshow(topodat,cmap=cm.s3pcpn,interpolation='nearest',vmin=dat_min,vmax=dat_max+(0.1*(dat_min-dat_max))) The it is the 'Data Max' text that is of concern. Notice it does not equal the max color according to the scale... the scatter point itself is not of issue. -john Michael Droettboom-3 wrote: > > The image is being plot in linear scale, while the scatter point is > being plotted with log scale...? > > John [H2O] wrote: >> I should add here also, this doesn't explain for me why the values are >> different?? Thoughts on that mtter? >> >> Thanks!! >> >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20191667.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John [H2O] <was...@gm...> - 2008-10-27 16:03:20
|
I should add here also, this doesn't explain for me why the values are different?? Thoughts on that mtter? Thanks!! -- View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20190717.html Sent from the matplotlib - users mailing list archive at Nabble.com. |