From: Oz N. <na...@gm...> - 2010-05-31 23:58:20
Attachments:
Fig0.png
|
Hi, I wanted to be more clear: the numbers on my figure's color bar range from 0 to 1.7, but mpl writes the following numbers: 0.0000, 0.000250,0.000050,0.000750, etc. This is totally not somthing I can use, it looks horrible. I'm also attaching the image ... -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
From: Oz N. <na...@gm...> - 2010-06-01 00:33:41
|
found a solution after 2 hours ... colorbar(ax=ax1, orientation='horizontal',format='%.3f') now, I need to know how to set up limits for all the images which are exactly the same limits. So far I'm failing with the use of "boundaries" .... Would be happy to know -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
From: Benjamin R. <ben...@ou...> - 2010-06-01 00:42:17
|
Oz, Some plotting functions like pcolor and imshow have keyword args for vmin/vmax where you can explicitly set the min and maximum values for the colorscale. There are some more complicated things you can do with the colormap that are more generic to all plotting functions as well, but I would see if using vmin and vmax does the trick for you. Ben Root On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > found a solution after 2 hours ... > > colorbar(ax=ax1, orientation='horizontal',format='%.3f') > > now, I need to know how to set up limits for all the images which are > exactly the same limits. > So far I'm failing with the use of "boundaries" > > .... > > Would be happy to know > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Oz N. <na...@gm...> - 2010-06-01 00:51:45
|
Hi Thanks for the answer, actually, I always use show and plot, I have no clue how to use the functions you suggested ... I'll look into it. Do you have an idea where I can find a description of the keyword "format" '%.3f' is nice, but still not scientific format... is this like Fortran? On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: > Oz, > > Some plotting functions like pcolor and imshow have keyword args for > vmin/vmax where you can explicitly set the min and maximum values for the > colorscale. There are some more complicated things you can do with the > colormap that are more generic to all plotting functions as well, but I > would see if using vmin and vmax does the trick for you. > > Ben Root > > On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > >> found a solution after 2 hours ... >> >> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >> >> now, I need to know how to set up limits for all the images which are >> exactly the same limits. >> So far I'm failing with the use of "boundaries" >> >> .... >> >> Would be happy to know >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
From: Benjamin R. <ben...@ou...> - 2010-06-01 01:59:38
|
On Mon, May 31, 2010 at 7:51 PM, Oz Nahum <na...@gm...> wrote: > Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword "format" > > '%.3f' is nice, but still not scientific format... > > is this like Fortran? > I believe so (I am not too familiar with fortran, but the ideas are similar in many languages like C's sprintf. You can do '%.3g' to pretty print the float numbers (in a sense), and '%.3e' to always do scientific notation. Ben Root |
From: Andre Walker-L. <wal...@gm...> - 2010-06-01 00:55:26
|
> Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you > suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword > "format" > > '%.3f' is nice, but still not scientific format... you can use '%.3e' for scientific format. Cheers, Andre > > is this like Fortran? > > On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> > wrote: > Oz, > > Some plotting functions like pcolor and imshow have keyword args for > vmin/vmax where you can explicitly set the min and maximum values > for the colorscale. There are some more complicated things you can > do with the colormap that are more generic to all plotting functions > as well, but I would see if using vmin and vmax does the trick for > you. > > Ben Root > > On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: > found a solution after 2 hours ... > > colorbar(ax=ax1, orientation='horizontal',format='%.3f') > > now, I need to know how to set up limits for all the images which are > exactly the same limits. > So far I'm failing with the use of "boundaries" > > .... > > Would be happy to know > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Oz N. <na...@gm...> - 2010-06-01 00:57:12
|
hi andre, thanks for your reply, do you know where I can find more documentation about this ? Thanks, On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm...>wrote: > Hi Thanks for the answer, > > actually, I always use > show and plot, I have no clue how to use the functions you suggested ... > > I'll look into it. > > Do you have an idea where I can find a description of the keyword "format" > > '%.3f' is nice, but still not scientific format... > > > you can use > > '%.3e' > > for scientific format. > > > Cheers, > > Andre > > > > > is this like Fortran? > > On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: > >> Oz, >> >> Some plotting functions like pcolor and imshow have keyword args for >> vmin/vmax where you can explicitly set the min and maximum values for the >> colorscale. There are some more complicated things you can do with the >> colormap that are more generic to all plotting functions as well, but I >> would see if using vmin and vmax does the trick for you. >> >> Ben Root >> >> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >> >>> found a solution after 2 hours ... >>> >>> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >>> >>> now, I need to know how to set up limits for all the images which are >>> exactly the same limits. >>> So far I'm failing with the use of "boundaries" >>> >>> .... >>> >>> Would be happy to know >>> >>> -- >>> Oz Nahum >>> Graduate Student >>> Zentrum für Angewandte Geologie >>> Universität Tübingen >>> >>> --- >>> >>> Imagine there's no countries >>> it isn't hard to do >>> Nothing to kill or die for >>> And no religion too >>> Imagine all the people >>> Living life in peace >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
From: Andre Walker-L. <wal...@gm...> - 2010-06-01 01:01:44
|
Hi Oz, Sorry, I am not familiar with what you are trying to do with your plots. Everything I have learned is from trial and error, the gallery page http://matplotlib.sourceforge.net/gallery.html and the user manual http://matplotlib.sourceforge.net/contents.html Good luck, Andre On May 31, 2010, at 8:56 PM, Oz Nahum wrote: > hi andre, > thanks for your reply, > > do you know where I can find more documentation about this ? > > Thanks, > > > > On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm... > > wrote: >> Hi Thanks for the answer, >> >> actually, I always use >> show and plot, I have no clue how to use the functions you >> suggested ... >> >> I'll look into it. >> >> Do you have an idea where I can find a description of the keyword >> "format" >> >> '%.3f' is nice, but still not scientific format... > > you can use > > '%.3e' > > for scientific format. > > > Cheers, > > Andre > > > >> >> is this like Fortran? >> >> On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> >> wrote: >> Oz, >> >> Some plotting functions like pcolor and imshow have keyword args >> for vmin/vmax where you can explicitly set the min and maximum >> values for the colorscale. There are some more complicated things >> you can do with the colormap that are more generic to all plotting >> functions as well, but I would see if using vmin and vmax does the >> trick for you. >> >> Ben Root >> >> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >> found a solution after 2 hours ... >> >> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >> >> now, I need to know how to set up limits for all the images which are >> exactly the same limits. >> So far I'm failing with the use of "boundaries" >> >> .... >> >> Would be happy to know >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > |
From: Vincent S. <sc...@sa...> - 2010-06-01 08:34:49
|
On 06/01/2010 02:56 AM, Oz Nahum wrote: > hi andre, > thanks for your reply, > > do you know where I can find more documentation about this ? check http://docs.python.org/library/stdtypes.html#string-formatting Regards, VS. |
From: Oz N. <na...@gm...> - 2010-06-01 01:02:44
|
On Mon, May 31, 2010 at 6:01 PM, Oz Nahum <na...@gm...> wrote: > I now get something really ugly > > the labels are 1.164E+00 > > would be great to remove the + sign, if I can only do 1.164E0 > > it's the best.... > > > On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud <wal...@gm...>wrote: > >> Hi Thanks for the answer, >> >> actually, I always use >> show and plot, I have no clue how to use the functions you suggested ... >> >> I'll look into it. >> >> Do you have an idea where I can find a description of the keyword "format" >> >> '%.3f' is nice, but still not scientific format... >> >> >> you can use >> >> '%.3e' >> >> for scientific format. >> >> >> Cheers, >> >> Andre >> >> >> >> >> is this like Fortran? >> >> On Mon, May 31, 2010 at 5:41 PM, Benjamin Root <ben...@ou...> wrote: >> >>> Oz, >>> >>> Some plotting functions like pcolor and imshow have keyword args for >>> vmin/vmax where you can explicitly set the min and maximum values for the >>> colorscale. There are some more complicated things you can do with the >>> colormap that are more generic to all plotting functions as well, but I >>> would see if using vmin and vmax does the trick for you. >>> >>> Ben Root >>> >>> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum <na...@gm...> wrote: >>> >>>> found a solution after 2 hours ... >>>> >>>> colorbar(ax=ax1, orientation='horizontal',format='%.3f') >>>> >>>> now, I need to know how to set up limits for all the images which are >>>> exactly the same limits. >>>> So far I'm failing with the use of "boundaries" >>>> >>>> .... >>>> >>>> Would be happy to know >>>> >>>> -- >>>> Oz Nahum >>>> Graduate Student >>>> Zentrum für Angewandte Geologie >>>> Universität Tübingen >>>> >>>> --- >>>> >>>> Imagine there's no countries >>>> it isn't hard to do >>>> Nothing to kill or die for >>>> And no religion too >>>> Imagine all the people >>>> Living life in peace >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> >>> >> >> >> -- >> Oz Nahum >> Graduate Student >> Zentrum für Angewandte Geologie >> Universität Tübingen >> >> --- >> >> Imagine there's no countries >> it isn't hard to do >> Nothing to kill or die for >> And no religion too >> Imagine all the people >> Living life in peace >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> > > > -- > Oz Nahum > Graduate Student > Zentrum für Angewandte Geologie > Universität Tübingen > > --- > > Imagine there's no countries > it isn't hard to do > Nothing to kill or die for > And no religion too > Imagine all the people > Living life in peace > > > -- Oz Nahum Graduate Student Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's no countries it isn't hard to do Nothing to kill or die for And no religion too Imagine all the people Living life in peace |
From: Friedrich R. <fri...@gm...> - 2010-06-01 19:07:48
|
this list configuration got me again ... 2010/6/1 Oz Nahum <na...@gm...>: > the numbers on my figure's color bar range from 0 to 1.7, > but mpl writes the following numbers: > > 0.0000, 0.000250,0.000050,0.000750, > > etc. > > This is totally not somthing I can use, it looks horrible. What do you mean by > the numbers on my figure's color bar range from 0 to 1.7 ? Actually the colorbar in your pic ranges from 1.179 + 0.000000 to 1.1792 = 1.179 + 0.000200 Hmm, so I guess ScalarFormatter is already used and does its best job already. The notation chosen is at least not erratic or random. You can modify the data to suit plotting needs or modify the plotting rules by writing a simple own formatter. Friedrich |