Home > Net >  How to increase the size of only one plot in subplots?
How to increase the size of only one plot in subplots?

Time:10-17

If you have two subplots, how do you change the length of only the second plot? Adding figsize=(7,5) to plt.subplots changes the size of both plots, but hoping to change only the size of the 2nd one.

source code: enter image description here

# alternative way to plot

fig, (ax1, ax2) = plt.subplots(1, 2,figsize=(7,5))
ax1.plot(x1,y1)
ax2.plot(x2,y2)
plt.show()

There are no errors, but how do you adjust the size of only the 2nd plot but keeping the placement of the plots being next to each other? Thanks!

CodePudding user response:

enter image description here


If you want to try Pylustrator without installing anything on your system, this markdown text steps you through how you can try it in much more detail in your browser on a temporary remote machine. (There's temporarily a problem with launching Spyder inside what comes up when you launch using the button in the main repo, and so use this link to launch a session for now. I filed an issue report at Pylustrator's GitHub repo.)

  • Related