diff --git a/openmc/model/model.py b/openmc/model/model.py index 4b39cb23850..fbb7221aa54 100644 --- a/openmc/model/model.py +++ b/openmc/model/model.py @@ -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 @@ -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(