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 commented on 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_3d transforms the path, but the segment cut-out in draw does not work for the transformed path.
alspitz commented on 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).