I am trying to have a multiple subplots with twinx() for the charts, but met with this error:
TypeError: 'AxesSubplot' object does not support item assignment
The code is as following:
fig, ax = plt.subplots(4,5,figsize=(8,8))
ax2[0,0]=ax[0,0].twinx()
When I try another way without the arrays:
fig, ax = plt.subplots(4,5,figsize=(8,8))
ax2=ax.twinx()
it comes out with another error:
AttributeError: 'numpy.ndarray' object has no attribute 'twinx'