Making an Axis Label like a legend

Hello again,
I've got a question about axis labels, specifically y axis labels for
multiple lines. What I'd ideally like to do is take something like the
legends shown in the attached picture, rotate them 90 degrees counter
clockwise, then stick them to the left of the Y axes to use it as a label
there. I don't think there is any way to rotate the legend, but is there
anything I could do to get a similar effect? Basically I'd like the legend
out of the plot area and into the y axis title, but it needs to show which
line is which. Having the sample line and marker in the title would be
perfect, but I guess just having the words in the corresponding colour would
work too.

Thanks a lot!
Alex
http://old.nabble.com/file/p27826934/test.png

···

--
View this message in context: http://old.nabble.com/Making-an-Axis-Label-like-a-legend-tp27826934p27826934.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hmm I think I could do this with TextWithDash, but I can't manage to use
it... I go:

CumGasTxt = fig.text(0.5, 0.5, 'Cumulative Gas (MCF)', withdash=True)

and it says "AttributeError: Unknown property withdash".

I tried changing "fig" to "ax1", but although that doesn't spit out an
error, it doesn't display anything.

Does anyone know what I'm doing wrong?

Thanks a lot,
Alex

···

--
View this message in context: http://old.nabble.com/Making-an-Axis-Label-like-a-legend-tp27826934p27841250.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hi Alex,

I cannot see the keyword argument 'withdash' for fig.text, but it does exists
for ax.text (with ax being an subplot instance) at least since maplotlib
version 0.99.

Kind regards,

Matthias

···

On Tuesday 09 March 2010 21:10:49 Alex S wrote:

Hmm I think I could do this with TextWithDash, but I can't manage to use
it... I go:

CumGasTxt = fig.text(0.5, 0.5, 'Cumulative Gas (MCF)', withdash=True)

and it says "AttributeError: Unknown property withdash".

I tried changing "fig" to "ax1", but although that doesn't spit out an
error, it doesn't display anything.

Does anyone know what I'm doing wrong?

Thanks a lot,
Alex

Ah, perfect, I wasn't seeing the labels when I was calling it with ax because
I was still using .5, .5 for the location and that was off the screen.
Thanks a lot!
Alex

Matthias Michler wrote:

···

On Tuesday 09 March 2010 21:10:49 Alex S wrote:

Hmm I think I could do this with TextWithDash, but I can't manage to use
it... I go:

CumGasTxt = fig.text(0.5, 0.5, 'Cumulative Gas (MCF)', withdash=True)

and it says "AttributeError: Unknown property withdash".

I tried changing "fig" to "ax1", but although that doesn't spit out an
error, it doesn't display anything.

Does anyone know what I'm doing wrong?

Thanks a lot,
Alex

Hi Alex,

I cannot see the keyword argument 'withdash' for fig.text, but it does
exists
for ax.text (with ax being an subplot instance) at least since maplotlib
version 0.99.

Kind regards,

Matthias

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
View this message in context: http://old.nabble.com/Making-an-Axis-Label-like-a-legend-tp27826934p27854071.html
Sent from the matplotlib - users mailing list archive at Nabble.com.