You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arc and pathpatch_2d_to_3d plots full ellipse #19550
I'm trying to draw an arc with an arrow in a 3D plot (to visualize an angle) and am having trouble using pathpatch_2d_to_3d. The full circle is displayed when a 3D figure is used.
The problem is the internal representation of the Arc: It's path is an ellipse (actually a transformed circle). The angles are stored and used in Arc.draw() to limit drawing to the correct ellipse segment. pathpatch_2d_to_3d transforms the path, but the segment cut-out in draw does not work for the transformed path.
I can get it to at least display the right arc by adding self._path = Path.arc(theta1, theta2)
after the Ellipse constructor call in the Arc constructor, though not sure if this messes with the 2D drawing logic (and it won't handle the errors in the approximation in case they are visible like draw does).
Activity
timhoffm commentedon Feb 28, 2021
The problem is the internal representation of the Arc: It's path is an ellipse (actually a transformed circle). The angles are stored and used in
Arc.draw()to limit drawing to the correct ellipse segment.pathpatch_2d_to_3dtransforms the path, but the segment cut-out in draw does not work for the transformed path.alspitz commentedon Feb 28, 2021
I can get it to at least display the right arc by adding
self._path = Path.arc(theta1, theta2)after the Ellipse constructor call in the Arc constructor, though not sure if this messes with the 2D drawing logic (and it won't handle the errors in the approximation in case they are visible like draw does).