Hi Gökhan et al,

I hope the following code might help you out and show you the basic idea of sharing the same x and y axis over several subplots. I've made a plot with 2 x 2 subplots sharing both x and y axis and showing only the labels at the left and the labels at the bottom.

   import pylab

   figprops = dict(figsize=(8., 8. / 1.618),
   dpi=128)                              # Figure properties
   adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
   wspace=0.08,
hspace=0.1) #
   Subplot properties

   fig =
pylab.figure(**figprops) # New figure fig.subplots_adjust(**adjustprops) # Tunes the subplot layout

   ax = fig.add_subplot(2, 2, 1)
   bx = fig.add_subplot(2, 2, 2, sharex=ax, sharey=ax)
   cx = fig.add_subplot(2, 2, 3, sharex=ax, sharey=ax)
   dx = fig.add_subplot(2, 2, 4, sharex=ax, sharey=ax)

   ax.plot(X1, Y1, 'k-')
   bx.plot(X2, Y2, 'k-')
   cx.plot(X3, Y3, 'k-')
   dx.plot(X4, Y4, 'k-')

   pylab.setp(ax.get_xticklabels(), visible=False)
   pylab.setp(bx.get_xticklabels(), visible=False)
   pylab.setp(bx.get_yticklabels(), visible=False)
   pylab.setp(dx.get_yticklabels(), visible=False)

You can make the subplots come closer by changing the /wspace/ and /hspace/ entries in the /adjustprops/ dictionary.

Cheers,
Sebastian


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 :(

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
------------------------------------------------------------------------------
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to