# Colorbar labels never appear vertically

Hi,

I am having a problem where the colorbar labels will never appear vertically, even when their rotation is specified as “vertical”. As you can see in the screenshot here: http://minus.com/lbOJyOljH this creates problems when the labels are cut off and generally looks unprofessional.

I am creating the colorbars with code like:
cbar1.set_label(“Lifetime [$\mu$s]”, rotation=‘vertical’)

And yet the specified rotation has no effect.

Any help would be much appreciated,

James

Hi,

I am having a problem where the colorbar labels will never appear
vertically, even when their rotation is specified as "vertical". As you
can see in the screenshot here: http://minus.com/lbOJyOljH this creates
problems when the labels are cut off and generally looks unprofessional.

I am creating the colorbars with code like:
cbar1.set_label("Lifetime [$\mu$s]", rotation='vertical')

I don't understand; even with no kwarg, the label on a vertical colorbar will be vertical. It has been that way for as long as I can remember.

What mpl version are you using?
Please provide a minimal standalone script showing the problem.

Eric

···

On 08/18/2011 09:53 PM, James McMurray wrote:

And yet the specified rotation has no effect.

Any help would be much appreciated,
James

------------------------------------------------------------------------------
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I made this standalone script here: http://pastebin.com/AnKeCwiU and this does not suffer from the issue. For comparison here is the plotting function in my program: http://pastebin.com/7xxtPQYb

The only major difference is the use of the interactive display in the script, against the use of Figure and the GTK canvas in my application.

I am using matplotlib 1.0.1

···

On 19 August 2011 10:28, Eric Firing <efiring@…202…> wrote:

On 08/18/2011 09:53 PM, James McMurray wrote:

Hi,

I am having a problem where the colorbar labels will never appear

vertically, even when their rotation is specified as “vertical”. As you

can see in the screenshot here: http://minus.com/lbOJyOljH this creates

problems when the labels are cut off and generally looks unprofessional.

I am creating the colorbars with code like:

     cbar1.set_label("Lifetime [$\mu$s]", rotation='vertical')


I don’t understand; even with no kwarg, the label on a vertical colorbar

will be vertical. It has been that way for as long as I can remember.

What mpl version are you using?

Please provide a minimal standalone script showing the problem.

Eric

And yet the specified rotation has no effect.

Any help would be much appreciated,

James

user administration capabilities and model configuration. Take

the hassle out of deploying and managing Subversion and the

tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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

user administration capabilities and model configuration. Take

the hassle out of deploying and managing Subversion and the

tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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

After some testing, it appears to be caused by the use of LaTeX in the labels which then prevents it from being rotated (but only inside the GTK application). I have no idea why this is only occurring when it is not in interactive mode, but I guess for the time being I can just try not to use LaTeX.

···

On 19 August 2011 10:57, James McMurray <jamesmcm03@…1972…> wrote:

I made this standalone script here: http://pastebin.com/AnKeCwiU and this does not suffer from the issue. For comparison here is the plotting function in my program: http://pastebin.com/7xxtPQYb

The only major difference is the use of the interactive display in the script, against the use of Figure and the GTK canvas in my application.

I am using matplotlib 1.0.1

On 19 August 2011 10:28, Eric Firing <efiring@…202…> wrote:

On 08/18/2011 09:53 PM, James McMurray wrote:

Hi,

I am having a problem where the colorbar labels will never appear

vertically, even when their rotation is specified as “vertical”. As you

can see in the screenshot here: http://minus.com/lbOJyOljH this creates

problems when the labels are cut off and generally looks unprofessional.

I am creating the colorbars with code like:

     cbar1.set_label("Lifetime [$\mu$s]", rotation='vertical')


I don’t understand; even with no kwarg, the label on a vertical colorbar

will be vertical. It has been that way for as long as I can remember.

What mpl version are you using?

Please provide a minimal standalone script showing the problem.

Eric

And yet the specified rotation has no effect.

Any help would be much appreciated,

James

user administration capabilities and model configuration. Take

the hassle out of deploying and managing Subversion and the

tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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

user administration capabilities and model configuration. Take

the hassle out of deploying and managing Subversion and the

tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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

I made this standalone script here: http://pastebin.com/AnKeCwiU and
this does not suffer from the issue. For comparison here is the plotting
function in my program: http://pastebin.com/7xxtPQYb

The problem is that the Gtk backend does not support text rotation. If you use FigureCanvasGTKAgg instead of FigureCanvasGTK, I think the behavior will be back to normal. The Gtk backend is not fully functional or supported.

Eric

···

On 08/18/2011 10:57 PM, James McMurray wrote:

The only major difference is the use of the interactive display in the
script, against the use of Figure and the GTK canvas in my application.

I am using matplotlib 1.0.1

On 19 August 2011 10:28, Eric Firing <efiring@…202… > <mailto:efiring@…202…>> wrote:

On 08/18/2011 09:53 PM, James McMurray wrote:
> Hi,
>
> I am having a problem where the colorbar labels will never appear
> vertically, even when their rotation is specified as "vertical".
As you
> can see in the screenshot here: http://minus.com/lbOJyOljH this
creates
> problems when the labels are cut off and generally looks
unprofessional.
>
> I am creating the colorbars with code like:
> cbar1.set_label("Lifetime [$\mu$s]", rotation='vertical')

I don't understand; even with no kwarg, the label on a vertical colorbar
will be vertical. It has been that way for as long as I can remember.

What mpl version are you using?
Please provide a minimal standalone script showing the problem.

Eric

>
> And yet the specified rotation has no effect.
>
> Any help would be much appreciated,
> James
>
------------------------------------------------------------------------------
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
<mailto:Matplotlib-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
<mailto:Matplotlib-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------