2014-01-14 30 views
2

我想在matplotlib陰謀與安排,像這樣的次要情節:安排matplotlib次要情節到子網格

Layout

這裏每個顏色的方塊代表一個不同的插曲。我怎樣才能讓matplotlib製作兩個subplots,其中一個有幾個sub-subplots?

+3

我發現http://matplotlib.org/users/gridspec.html方便我的工作 – cgeroux

+0

@cgeroux :將其擴展爲答案,我會接受它。 – Dan

回答

3

您可以使用subplot()

pl.figure(figsize=(12, 6)) 
pl.subplot(1, 2, 1) 
for axeid in (3, 4, 7, 8): 
    pl.subplot(2, 4, axeid) 

輸出爲:

enter image description here