8000 GitHub · Where software is built
[go: up one dir, main page]

Skip to content
Arc and pathpatch_2d_to_3d plots full ellipse #19550
Closed
@alspitz

Description

@alspitz

Bug report

Bug summary

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.

I found https://discourse.matplotlib.org/t/matplotlib-users-arc-and-art3d-pathpatch-2d-to-3d/21104, which is the exact same issue.
What's the best way to achieve the desired outcome?

Code for reproduction

import matplotlib.pyplot as plt
from matplotlib.patches import Arc
import mpl_toolkits.mplot3d.art3d as art3d

fig = plt.figure()
ax = plt.axes(projection='3d')
a = Arc((0.5, 0.5), width=0.5, height=0.5, angle=0, theta1=0, theta2=90)
ax.add_patch(a)
art3d.pathpatch_2d_to_3d(a, z=0, zdir='z')
plt.show()

Actual outcome

Figure_1

Expected outcome

I expect the arc to be 90 degrees, not a full circle.

Matplotlib version
Matplotlib 3.3.4 w/ Python 3.9.1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0