Not sure what you mean global axis but I think I was trying to do something similar with this. This is the chunk of one subplot. Specifically look at last three lines:
ax = fig.add_subplot(2,2,2)
ax.set_title('b) 5')
ax.set_ylim((0,yUpper))
for i in tempRun:
ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i], linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotColor)])
clear_spines(ax)
ax.set_xticklabels('')
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')

Cheers,
Jeff

On 20/09/11 09:20, Brad Malone wrote:
Hello again,

I've actually made some more progress on my last question after finding this site: http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label

and I was able to adjust the widths of my spacing.

My current plot looks like this:
http://imageshack.us/photo/my-images/849/current.png/

with source code that looks like:

    adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
    wspace=0.25, hspace=0.25)
    fig=figure()
    fig.subplots_adjust(**adjustprops)

    ax=subplot(221)
    plot(x2cp,y2cp,'bo',markersize=3)
    #ax.set_title('2cP')
    text(12,0.03,'2cP')
    #ylabel('Displacement')
    axis([0,16,0,0.04])
    bx=subplot(223)
    plot(x2cb,y2cb,'bo',markersize=3)
    #ax.set_title('2cB')
    text(12,0.225,'2cB')
    axis([0,16,0,0.3])
    cx=subplot(222)
    plot(x6fp,y6fp,'bo',markersize=3)
    #ax.set_title('6fP')
    text(12,0.03375,'6fP')
    axis([0,16,0,0.045])
    dx=subplot(224)
    plot(x6fb,y6fb,'bo',markersize=3)
    #ax.set_title('6fB')
    text(12,0.225,'6fB')
    axis([0,16,0,0.3])


    show()



Now the only thing I'd like to do now is create a global y-axis and a global x-axis along the bottom for all 4 plots (which the website I linked to above gives some hints about, but trying what I thought was equivalent didn't work). And lastly, I wanted those y-axes which go from 0.000 to 0.040 to instead go from 0.00 to 0.04 (i.e., only two decimal places, getting rid of the ones that are in between).

Thanks for any guidance you can give.

Best,
Brad

On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <brad.mal...@gmail.com <mailto:brad.mal...@gmail.com>> wrote:

    Hi, I am trying to do a simple 2x2 box of plots. My code is so far
    very simple, and simply looks something like this.

                  ax=subplot(221)

            plot(x2cp,y2cp)
            ax.set_title('2cP')
            ylabel('Displacement')
            ax=subplot(222)
            plot(x2cb,y2cb)
            ax.set_title('2cB')
            ax=subplot(223)
            plot(x6fp,y6fp)
            ax.set_title('6fP')
            ax=subplot(224)
            plot(x6fb,y6fb)
            ax.set_title('6fB')
            show()


    But when I do this, the text and numbers from various plots
    overlap each other and get in the way (I noticed this is a common
    problem among the images in the matplotlib gallery as well). I
    have 2 questions:

    1). How can I control the spacing, or padding, between the plots
    so that the numbers don't overlap?
    2). Is there a way for me to have a single common y-axis label and
    x-axis label that runs along the full left-hand side and bottom,
    respectively?

    Thanks so much for the help!

    Brad




------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1


_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to