I have a chart in matplotlib which uses two subplots. Code is as follows:
# Chart
chart_data['whisker'] = chart_data['high'] - chart_data['low']
%matplotlib inline
fig, axs = plt.subplots(2, 1, sharex=True, figsize=(20, 15))
#fig.figure(num=None, figsize=(8, 6))
mpl.pyplot.figure(num=1, figsize=(16, 9))
fig.subplots_adjust(hspace=0)
#mpl.rcParams['figure.figsize'] = [16, 9]
axs[0].bar(chart_data['timestamp'], chart_data['whisker'], width=0.0004, bottom=chart_data['low'], color='b')
axs[1].bar(chart_data['timestamp'], chart_data['volume'], width=0.002)
axs[0].grid(b=None, which='both', axis='both')
axs[1].grid(b=None, which='both', axis='both')
axs[0].set_axisbelow(True)
axs[1].set_axisbelow(True)
plt.gcf().autofmt_xdate()
plt.show()
chart_data.head()
Chart data is as follows:
Chart result is as follows:
How can I make below subplot to have one third the height it has now? Or specify a given height. I have tried:
from matplotlib.pyplot import figure
figure(num=1, figsize=(8, 6))
whitout success