plt.subplots
ax=plt.subplots(2,1)
ax[0].plot(x,y,marker="v",color="r",linestyle="-")
ax[1].plot(y,z,marker="o",color="g",linestyle="--")
ax[0].set_ylabel("xlabel")
ax[1].set_ylabel("ylabel")
plt.show()
I am getting error
plt.subplots
ax=plt.subplots(2,1)
ax[0].plot(x,y,marker="v",color="r",linestyle="-")
ax[1].plot(y,z,marker="o",color="g",linestyle="--")
ax[0].set_ylabel("xlabel")
ax[1].set_ylabel("ylabel")
plt.show()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-54-49d441fdc0e5> in <module>
2 plt.subplots
3 ax=plt.subplots(2,1)
----> 4 ax[0].plot(x,y,marker="v",color="r",linestyle="-")
5 ax[1].plot(y,z,marker="o",color="g",linestyle="--")
6 ax[0].set_ylabel("xlabel")
AttributeError: 'Figure' object has no attribute 'plot'