How to rotate label on a twin axes

Hello,

One more figure and one more question. http://img263.imageshack.us/img263/6454/labelrotation.png

I want to rotate the 2nd y-axis label “Air Temperature” upside down in other words rotating 180 degree while A staying up. Unfortunately set_rotation method is not available to a SubplotHost instance.

Any ideas how to achieve this?

fig = plt.figure(figsize=(10,8))
host = SubplotHost(fig, 111)
fig.add_subplot(host)
pary = host.twinx()

host.set_xlabel("Time [sfm]")
host.set_ylabel("Pressure Altitude [m]")
pary.set_ylabel(r"Air Temperature [$^o\hspace{-0.5}C$]")
#pary.set_rotation("270")
···


Gökhan

The below line is supposed to work but it does not, which is a bug.

  pary.axis["right"].label.set_rotation(270)

Meanwhile, use may use something like below,

  pary.axis["right"].get_helper()._label_angles["right"]=270

Regards,

-JJ

···

On Fri, Oct 23, 2009 at 2:13 PM, Gökhan Sever <gokhansever@...287...> wrote:

Hello,

One more figure and one more question.
http://img263.imageshack.us/img263/6454/labelrotation.png

I want to rotate the 2nd y-axis label "Air Temperature" upside down in other
words rotating 180 degree while A staying up. Unfortunately set_rotation
method is not available to a SubplotHost instance.

Any ideas how to achieve this?

fig = plt\.figure\(figsize=\(10,8\)\)
host = SubplotHost\(fig, 111\)
fig\.add\_subplot\(host\)
pary = host\.twinx\(\)

host\.set\_xlabel\(&quot;Time \[sfm\]&quot;\)
host\.set\_ylabel\(&quot;Pressure Altitude \[m\]&quot;\)
pary\.set\_ylabel\(r&quot;Air Temperature \[$^o\\hspace\{\-0\.5\}C$\]&quot;\)
\#pary\.set\_rotation\(&quot;270&quot;\)

--
Gökhan

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Thanks JJ,

I wonder when will I learn to fix my own rent :slight_smile:

Glad to have you here always responding with a quick solution.

···

On Fri, Oct 23, 2009 at 4:46 PM, Jae-Joon Lee <lee.j.joon@…287…> wrote:

The below line is supposed to work but it does not, which is a bug.

pary.axis[“right”].label.set_rotation(270)

Meanwhile, use may use something like below,

pary.axis[“right”].get_helper()._label_angles[“right”]=270

Regards,

-JJ

On Fri, Oct 23, 2009 at 2:13 PM, Gökhan Sever <gokhansever@…287…> wrote:

Hello,

One more figure and one more question.

http://img263.imageshack.us/img263/6454/labelrotation.png

I want to rotate the 2nd y-axis label “Air Temperature” upside down in other

words rotating 180 degree while A staying up. Unfortunately set_rotation

method is not available to a SubplotHost instance.

Any ideas how to achieve this?

fig = plt.figure(figsize=(10,8))
host = SubplotHost(fig, 111)
fig.add_subplot(host)
pary = host.twinx()
host.set_xlabel("Time [sfm]")
host.set_ylabel("Pressure Altitude [m]")
pary.set_ylabel(r"Air Temperature [$^o\hspace{-0.5}C$]")
#pary.set_rotation("270")

Gökhan


Come build with us! The BlackBerry® Developer Conference in SF, CA

is the only developer event you need to attend this year. Jumpstart your

developing skills, take BlackBerry mobile applications to market and stay

ahead of the curve. Join us from November 9 - 12, 2009. Register now!

http://p.sf.net/sfu/devconference


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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


Gökhan