Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug summary
Incorrect type annotation for_AxesBase.twinx()
(should beSelf
, not_AxesBase
).
Code for reproduction
importmatplotlib.pyplotaspltimportnumpyasnp# First create some toy data:x=np.linspace(0,2*np.pi,400)y=np.sin(x**2)z=np.cos(x**2)# Create four polar Axes and access them through the returned arrayfig,axsA=plt.subplots()axsA.plot(x,y)axsB=axsA.twinx()axsB.plot(x,z)# <-- Cannot access attribute "plot" for class "_AxesBase"
Actual outcome
axsB is of type_AxesBase
Expected outcome
The type ofaxsB
should be the same as the type ofaxsA
.
Matplotlib Version
3.9.1
Metadata
Metadata
Assignees
Labels
No labels