Skip to content

Commit

Permalink
Fix connected theta edges for plot3d (#1237)
Browse files Browse the repository at this point in the history
Currently, if you don't give a full theta grid to `plot_3d`, it will
connect the theta edges and end up this kind of plots,

![image](https://github.com/user-attachments/assets/3b4fe4be-6bb5-45aa-922e-977401fb910a)

I don't know about you, but I want it to behave like this,

![image](https://github.com/user-attachments/assets/695994a0-1c5d-4b17-a4ff-98319fcf3888)
  • Loading branch information
YigitElma authored Sep 2, 2024
2 parents b683e85 + f1af4e2 commit 941f020
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desc/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,9 +971,9 @@ def plot_3d(
if grid.num_rho == 1:
n1, n2 = grid.num_theta, grid.num_zeta
if not grid.nodes[-1][2] == 2 * np.pi:
p1, p2 = True, False
p1, p2 = False, False
else:
p1, p2 = True, True
p1, p2 = False, True
elif grid.num_theta == 1:
n1, n2 = grid.num_rho, grid.num_zeta
p1, p2 = False, True
Expand Down

0 comments on commit 941f020

Please sign in to comment.