setting scientific number notation on colorbar

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

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 <nahumoz@…287…> 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

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

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.root@…1304…> 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 <nahumoz@…287…> 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

Matplotlib-users@lists.sourceforge.net

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

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.root@…1304…> 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 <nahumoz@…287…> 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
Matplotlib-users@lists.sourceforge.net
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
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

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 <walksloud@…287…> 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.root@…1304…> 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 <nahumoz@…287…> 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
Matplotlib-users@lists.sourceforge.net
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
Matplotlib-users@lists.sourceforge.net
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

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 <walksloud@…287…> 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.root@…1304…> 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 <nahumoz@…287…> 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
Matplotlib-users@…2982…e.net
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
Matplotlib-users@…504…et
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

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

···

On Mon, May 31, 2010 at 7:51 PM, Oz Nahum <nahumoz@…1972…> 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?

check Built-in Types — Python 3.12.0 documentation

Regards,
VS.

···

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 ?