Skip to content

Commit dcb85f7

Browse files
Update pmd_beamphysics/plot.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 243585d commit dcb85f7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pmd_beamphysics/plot.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,12 +1530,11 @@ def wakefield_plot(
15301530
fig : matplotlib.figure.Figure
15311531
The matplotlib figure containing the plot.
15321532
"""
1533-
if key is not None:
1534-
key = key
1535-
elif particle_group.in_t_coordinates:
1536-
key = "delta_z/c"
1537-
else:
1538-
key = "delta_t"
1533+
if key is None:
1534+
if particle_group.in_t_coordinates:
1535+
key = "delta_z/c"
1536+
else:
1537+
key = "delta_t"
15391538

15401539
if ax is None:
15411540
fig, ax = plt.subplots(**kwargs)

0 commit comments

Comments
 (0)