-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: contour on 3d plot fails if x and y are 1d and different lengths #21310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I suspect calling |
Yes, if you add
Compare to the documentation for Axes.contour, which has the much more helpful:
|
I don't think this is closed though? |
DOC Update description of ax.contour method, resolves matplotlib#21310
This was accidentally re-closed by the same commit getting pushed to |
Bug summary
Calling
ax.contour(x, y, z)
fails ifax
was created withprojection="3d"
andx
andy
are both1d
and different lengths.Code for reproduction
Actual outcome
If I call
plt.pause(1)
after the traceback, a plot shows up showing the plot with x and y limits [0, 1], which doesn't show much that is comprehensible. If I callax.set_xlim(-10, 10)
andax.set_ylim(-10, 10)
, the plot shows up fine.Expected outcome
Changing
NX
to 20 produces a 3d plot with a set of contours hovering aroundz=0.5
Operating system
Cygwin, Windows
Matplotlib Version
3.3.3, 3.4.3
Matplotlib Backend
TkAgg, matplotlib_inline.backend_inline
Python version
3.8.10; 3.9.7
Jupyter version
No response
Other libraries
matplotlib_inline==0.1.3
Installation
conda
Conda channel
conda-forge
The text was updated successfully, but these errors were encountered: