'Changing the size of two subplot Graphs, one top and one bottom
I am creating a graph with two subplots. One top graph and a bottom graph underneath it. How do I change the dimensions of the bottom subgraph without changing the top subgraph?
fig, ax = plt.subplots(2)
fig.set_size_inches(18.5, 10.5)
ax[0].plot(dt, y1, label="Stock Price", linewidth=2.5) #Graph at the top
ax[1].bar(dt, y2, label="RSI", linewidth=5.5) #The graph at the bottom I want to reduce the length of this graph but keep the width the same. The two graphs have to line up across the x-axis (time)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
