I am currently using matplotlib in python to graphically display some data, however I want the graph headers to be on the Y axis, because there is not enough space for both the title of one graph and the x-axis label for Others. I know that I can simply set hspace to a larger number, but I do not want to do this because I plan to have several diagrams stacked on top of each other, and if I adjust the hspace, then the graph will be really short and difficult to read.
like this http://oi39.tinypic.com/2a4r5i1.jpg
Here is my code
import numpy as np
import matplotlib.pyplot as plt
fig=plt.figure()
rect = fig.patch
rect.set_facecolor('#31312e')
x = [1,2,3,4,5,6,7,8]
y = [4,3,8,2,8,0,3,2]
z = [2,3,0,8,2,8,3,4]
ax1 = fig.add_subplot(2,1,1, axisbg='gray')
ax1.plot(x, y, 'c', linewidth=3.3)
ax1.set_title('title', color='c')
ax1.set_xlabel('xlabel')
ax1.set_ylabel('ylabel')
ax2 = fig.add_subplot(2,1,2, axisbg='gray')
ax2.plot(x, z, 'c', linewidth=3.3)
ax2.set_xlabel('xlabel')
ax2.set_ylabel('ylabel')
plt.show()
thanks in advance