Skip to content

Commit f281392

Browse files
authored
Fixed plotting issue by scaling source locations with axis units (#3668)
1 parent db8d462 commit f281392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openmc/model/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,8 @@ def plot(
12871287
tol = plane_tolerance
12881288
for particle in particles:
12891289
if (slice_value - tol < particle.r[z] < slice_value + tol):
1290-
xs.append(particle.r[x])
1291-
ys.append(particle.r[y])
1290+
xs.append(particle.r[x] * axis_scaling_factor[axis_units])
1291+
ys.append(particle.r[y] * axis_scaling_factor[axis_units])
12921292
axes.scatter(xs, ys, **source_kwargs)
12931293

12941294
return axes

0 commit comments

Comments
 (0)