-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed as not planned
Closed as not planned
Copy link
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: mplot3d
Milestone
Description
Code for reproduction
import matplotlib as mpl
import matplotlib.pyplot
import mpl_toolkits as mplt
import mpl_toolkits.mplot3d.axes3d
fig = mpl.pyplot.figure() # make Figure
ax = mpl.pyplot.gca(projection="3d")
circle1 = mpl.patches.Circle((5,1))
circle2 = mpl.patches.Circle((2,2))
# test 1 (throws ValueError):
#pc1 = matplotlib.collections.PatchCollection([circle1, circle2])
#ax.add_collection3d(pc1, zs=[1,2])
# test 2:
pc2 = mplt.mplot3d.art3d.Patch3DCollection([circle1, circle2], match_original=True)
ax.add_collection3d(pc2)test 1 results into a ValueError:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 519, in _draw_idle
self.draw()
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 402, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/lib/python3.6/site-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 287, in draw
reverse=True)):
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 286, in <lambda>
key=lambda col: col.do_3d_projection(renderer),
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 400, in do_3d_projection
fcs = (zalpha(self._facecolor3d, vzs) if self._depthshade else
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 776, in zalpha
colors = get_colors(colors, len(zs))
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 767, in get_colors
(num, 4))
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 176, in broadcast_to
return _broadcast_to(array, shape, subok=subok, readonly=True)
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 128, in _broadcast_to
op_flags=[op_flag], itershape=shape, order='C')
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,4) and requested shape (1,4)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 519, in _draw_idle
self.draw()
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 402, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/lib/python3.6/site-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 287, in draw
reverse=True)):
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 286, in <lambda>
key=lambda col: col.do_3d_projection(renderer),
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 400, in do_3d_projection
fcs = (zalpha(self._facecolor3d, vzs) if self._depthshade else
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 776, in zalpha
colors = get_colors(colors, len(zs))
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 767, in get_colors
(num, 4))
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 176, in broadcast_to
return _broadcast_to(array, shape, subok=subok, readonly=True)
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 128, in _broadcast_to
op_flags=[op_flag], itershape=shape, order='C')
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,4) and requested shape (1,4)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 519, in _draw_idle
self.draw()
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 402, in draw
self.figure.draw(self.renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/matplotlib/figure.py", line 1649, in draw
renderer, self, artists, self.suppressComposite)
File "/usr/lib/python3.6/site-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/lib/python3.6/site-packages/matplotlib/artist.py", line 50, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 287, in draw
reverse=True)):
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 286, in <lambda>
key=lambda col: col.do_3d_projection(renderer),
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 400, in do_3d_projection
fcs = (zalpha(self._facecolor3d, vzs) if self._depthshade else
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 776, in zalpha
colors = get_colors(colors, len(zs))
File "/usr/lib/python3.6/site-packages/mpl_toolkits/mplot3d/art3d.py", line 767, in get_colors
(num, 4))
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 176, in broadcast_to
return _broadcast_to(array, shape, subok=subok, readonly=True)
File "/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py", line 128, in _broadcast_to
op_flags=[op_flag], itershape=shape, order='C')
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,4) and requested shape (1,4)test 2 results into a weird plot drenched into a blueish color, there is a visible object also (perhaps change the viewing angle) but it's not a circle.

Matplotlib 3.1.0
- Operating system: Void Linux
- Matplotlib version: 3.1.0
- Matplotlib backend Qt5Agg:
- Python version: 3.6.8
Metadata
Metadata
Assignees
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: mplot3d