Re: [Matplotlib-users] Common ylabel for subplots

2009-03-10 Thread Chip Webber
Does this get you close?  It seems what your trying to do might be a bit 
ambiguous, but I understand the problem with the y-axis when there are 
lots of subplots.

Maybe it would be better to change the y-ticker to make fewer ticks or 
the labels to be smaller.

-Chip

from matplotlib import pyplot as plt

t = [0,1]
y=[0,1]

fig = plt.figure()

plt.axes([0.1,0.1,0.8,0.8], frameon=True, axisbg='w')
ax = fig.add_subplot(211)
plt.setp(ax.get_yticklabels(), visible=False)
plt.plot(t,y)
ax = fig.add_subplot(212)
plt.setp(ax.get_yticklabels(), visible=False)
plt.plot(t,y)
plt.show()


Gökhan SEVER wrote:
> Hello,
> 
> I have six subplots in my canvas, and wondering how to place a common 
> ylabel into the canvas in matplotlib? (Let say instead of having six 
> same text on the y-axes just to replace them with one bigger text 
> encompassing all six y-axes.)
> 
> Is this available in ml or am I too blind to see this feature?
> 
> Thanks,
> 
> Gökhan
> 
> 
> 
> 
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> 
> 
> 
> 
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Common ylabel for subplots

2009-03-10 Thread Chip Webber
Gökhan SEVER wrote:
> I don't know how to do this in matplotlib. Can you give an example?
> 
> Chip,
> 
> I tried your method but didn't work for me :(

Well, I'm using matplotlib 0.98.5.2, I'm not sure if that makes a 
difference or not.

Here's what I'm seeing:

http://yfrog.com/090366p

It's pretty rough, but I thought it might give you an idea or two.  Like 
I said, I've been meaning to clean up my subplots too I just haven't had 
time to do it.  I'd be curious to see how you do it if you get it working :)

-Chip


I'm pasting the source again in case I fumbled the last attempt:

#!/usr/bin/env python

# Make one axis that spans several subplots

from matplotlib import pyplot as plt

t = [0,1]
y = [0,1]

fig = plt.figure()

plt.axes([0.1,0.1,0.8,0.8], frameon=True, axisbg='w')
ax = fig.add_subplot(211)
plt.setp(ax.get_yticklabels(), visible=False)
plt.plot(t,y)
ax = fig.add_subplot(212)
plt.setp(ax.get_yticklabels(), visible=False)
plt.plot(t,y)
plt.show()



> 
> So far, my best approach is use some GIMP tricks on transparent canvas. 
> With these improvements I am finishing my first official poster.
> 
> Thanks.
> Gökhan
>  
> 
> On Tue, Mar 10, 2009 at 6:01 PM, Jonathan Taylor
> mailto:[email protected]>>
> wrote:
> 
> I don't know if there is a betteer way to do it, but I think you can
> just attach a text artist to the figures canvas.
> 
> Best,
> J.
> 
> On Mon, Mar 9, 2009 at 12:15 PM, Gökhan SEVER
> mailto:[email protected]>> wrote:
>  > Hello,
>  >
>  > I have six subplots in my canvas, and wondering how to place
> a common ylabel
>  > into the canvas in matplotlib? (Let say instead of having six
> same text on
>  > the y-axes just to replace them with one bigger text
> encompassing all six
>  > y-axes.)
>  >
>  > Is this available in ml or am I too blind to see this feature?
>  >
>  > Thanks,
>  >
>  > Gökhan
>  >
>  >
>  >
> 
> --
>  > Open Source Business Conference (OSBC), March 24-25, 2009,
> San Francisco, CA
>  > -OSBC tackles the biggest issue in open source: Open Sourcing
> the Enterprise
>  > -Strategies to boost innovation and cut costs with open
> source participation
>  > -Receive a $600 discount off the registration fee with the
> source code: SFAD
>  > http://p.sf.net/sfu/XcvMzF8H
>  > ___
>  > Matplotlib-users mailing list
>  > [email protected]
> 
>  > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>  >
>  >
> 
> 
> 
> 
> 
> 
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> 
> 
> 
> 
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users