Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions openmc/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,8 @@ def plot(
**contour_kwargs
)

# If only showing outline, set the axis limits and aspect explicitly
# If only showing outline, set the aspect explicitly
if outline == 'only':
axes.set_xlim(x_min, x_max)
axes.set_ylim(y_min, y_max)
axes.set_aspect('equal')

# Add legend showing which colors represent which material or cell
Expand Down Expand Up @@ -1532,6 +1530,10 @@ def plot(
ys.append(particle.r[y] * axis_scaling_factor[axis_units])
axes.scatter(xs, ys, **source_kwargs)

# Keep the requested view even when source points lie outside it.
axes.set_xlim(x_min, x_max)
axes.set_ylim(y_min, y_max)

return axes

def sample_external_source(
Expand Down
Loading