A (broken) patch to allow colorbars to be reversed

mmh, just yesterday I was talking to JDH about this: I

    > have the feeling that the right place to implement this
    > would be to provide colormaps (the beasts lurking
    > underneath colorbars) with an easy way to get reversed
    > versions. I don't think that a hack at the level of the
    > colorbar function is the right place, design wise, to do
    > this. But I could be wrong...

Unless I misunderstand, Nicolas and you want different things. You
want a reversed color map (eg for the case of jet, red would map to
small numbers and blue to large numbers). Nicolas wants a standard
colormap but with the colorbar display inverted (red would still map
to large numbers but for vertical colorbars would be on the bottom and
for horizontal colorbars would be on the left -- the colorbar tick
labels would change too).

Or am I misunderstanding?

JDH

At least you understood correctly what I meant :wink:

···

On Wednesday 01 June 2005 18:38, John Hunter wrote:

Unless I misunderstand, Nicolas and you want different things. You
want a reversed color map (eg for the case of jet, red would map to
small numbers and blue to large numbers). Nicolas wants a standard
colormap but with the colorbar display inverted (red would still map
to large numbers but for vertical colorbars would be on the bottom and
for horizontal colorbars would be on the left -- the colorbar tick
labels would change too).

Or am I misunderstanding?

John Hunter wrote:

"Fernando" == Fernando Perez <Fernando.Perez@...76...> writes:

    > mmh, just yesterday I was talking to JDH about this: I
    > have the feeling that the right place to implement this
    > would be to provide colormaps (the beasts lurking
    > underneath colorbars) with an easy way to get reversed
    > versions. I don't think that a hack at the level of the
    > colorbar function is the right place, design wise, to do
    > this. But I could be wrong...

Unless I misunderstand, Nicolas and you want different things. You
want a reversed color map (eg for the case of jet, red would map to
small numbers and blue to large numbers). Nicolas wants a standard
colormap but with the colorbar display inverted (red would still map
to large numbers but for vertical colorbars would be on the bottom and
for horizontal colorbars would be on the left -- the colorbar tick
labels would change too).

Ah! Yes, sorry: I did misunderstand Nicolas, probably because I parsed his post through the lens of our discussion too quickly. Sorry for the noise...

I wonder though: if we also get 'reversed' colormaps, is this going to be a cause for confusion with the 'reversed' colorbar keyword? It may not be a problem in the end, as long as the two different ideas are clearly explained, to prevent others falling into the same trap I did.

f

Please feel free to use any keyword you want, provided the feature is
implemented ! English is not my native language, so I just came to "reverse"
as the closest word to what I had in mind, but for sure there must be better
alternatives (invert, mirror, whatever)

Nicolas

···

On Wednesday 01 June 2005 18:50, Fernando Perez wrote:

I wonder though: if we also get 'reversed' colormaps, is this going to
be a cause for confusion with the 'reversed' colorbar keyword? It may
not be a problem in the end, as long as the two different ideas are
clearly explained, to prevent others falling into the same trap I did.

What do you think about this point, finally ? Do you think such option should
be added to colorbars ?

As you can see on http://nicolasgirard.nerim.net/img/artifacts.png it would
allow colors from the colorbars to fit colors in the figure much better...

Cheers,
Nicolas

···

On Wednesday 01 June 2005 18:57, Nicolas Girard wrote:

On Wednesday 01 June 2005 18:50, Fernando Perez wrote:
> I wonder though: if we also get 'reversed' colormaps, is this going to
> be a cause for confusion with the 'reversed' colorbar keyword? It may
> not be a problem in the end, as long as the two different ideas are
> clearly explained, to prevent others falling into the same trap I did.

Please feel free to use any keyword you want, provided the feature is
implemented ! English is not my native language, so I just came to
"reverse" as the closest word to what I had in mind, but for sure there
must be better alternatives (invert, mirror, whatever)