diff --git a/yt/visualization/plot_window.py b/yt/visualization/plot_window.py index f23be9c1df..65a4327d81 100644 --- a/yt/visualization/plot_window.py +++ b/yt/visualization/plot_window.py @@ -2467,7 +2467,7 @@ def __init__( if depth is None: # off-axis projection, depth not specified # -> set 'large enough' depth using half the box diagonal + margin - depth = np.sqrt(np.sum(ds.domain_width.in_units("code_length") ** 2)) * 1.02 + depth = np.linalg.norm(ds.domain_width.in_units("code_length")) * 1.02 depth = ds.coordinates.sanitize_depth(depth)[0] # center_rot normalizes the center to (0,0),