Row Titles within a matplotlib GridSpec
<p>I have an GridSpec defined layout with to subgrids, one is supposed to include a colorbar</p>

<pre><code>import pylab as plt
import numpy as np
gs_outer = plt.GridSpec(1, 2, width_ratios=(10, 1))
gs_inner = plt.matplotlib.gridspec.GridSpecFromSubplotSpec(2, 3, gs_outer[0])
ax = []
for i in xrange(6):
    ax.append(plt.subplot(gs_inner[i]))
    plt.setp(ax[i].get_xticklabels(), visible=False)
    plt.setp(ax[i].get_yticklabels(), visible=False)
ax.append(plt.subplot(gs_outer[1]))
plt.show()
</code></pre>

<p>I'd now like to get for the left part a row-wise labeling like this:<a href="https://i.stack.imgur.com/L2TLS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L2TLS.png" alt="enter image description here"></a></p>

<p>I tried to add another GridSpec into the GridSpec, but that did not work out:</p>

<pre><code>import pylab as plt
import numpy as np
fig = plt.figure()
gs_outer = plt.GridSpec(1, 2, width_ratios=(10, 1))
gs_medium = plt.matplotlib.gridspec.GridSpecFromSubplotSpec(3, 1, gs_outer[0])
ax_title0 = plt.subplot(gs_medium[0])
ax_title0.set_title('Test!')
gs_row1 = plt.matplotlib.gridspec.GridSpecFromSubplotSpec(1, 3, gs_medium[0])
ax00 = plt.subplot(gs_row1[0]) # toggle this line to see the effect
plt.show()
</code></pre>

<p>Adding the <code>ax00 = plt.subplot...</code> line seems to erase the previously created axis</p>