Hello,

I just noticed that in order to get a 3 row by 4 column grid, I have to
do

    import matplotlib.pyplot as plt
    from matplotlib.gridspec import GridSpec
    
    def make_ticklabels_invisible(fig):
        for i, ax in enumerate(fig.axes):
            ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center")
            for tl in ax.get_xticklabels() + ax.get_yticklabels():
                tl.set_visible(False)
    
    plt.figure()
    
    gs = GridSpec(3, 4)
    
    for i in range(4):
        for j in range(3):
            plt.subplot(gs[i, j])
            
    plt.suptitle("GridSpec")
    make_ticklabels_invisible(plt.gcf())
    plt.show()
    

So I have to instantiate GridSpec with a (rows, column), but when I
index the grid I have to use (column, row).

Is there any reason for this counterintuitive behaviour?


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to