Answers for "subplot of a function"

1

subplots matplotlib examples

fig, axs = plt.subplots(2, 2)
axs[0, 0].plot(x, y)
axs[0, 0].set_title("main")
axs[1, 0].plot(x, y**2)
axs[1, 0].set_title("shares x with main")
axs[1, 0].sharex(axs[0, 0])
axs[0, 1].plot(x + 1, y + 1)
axs[0, 1].set_title("unrelated")
axs[1, 1].plot(x + 2, y + 2)
axs[1, 1].set_title("also unrelated")
fig.tight_layout()
Posted by: Guest on January-25-2022
0

subplot

subplot(m,n,p)	%Creates subplot of m rows and n columns and assigns to plot in
p index of mxn subplot matrix.
Posted by: Guest on November-25-2020

Python Answers by Framework

Browse Popular Code Answers by Language