Skip to content

Commit ba4ce77

Browse files
committed
Sort ylim args
1 parent 01d5a6b commit ba4ce77

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pydmd/plotter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ def plot_summary(
616616
:type dynamics_color: str
617617
:param sval_ms: Marker size of all singular values.
618618
:type sval_ms: int
619-
:param max_eig_ms: Marker size of the most prominent eigenvalue.
619+
:param max_eig_ms: Marker size of the most prominent eigenvalue. The marker
620+
sizes of all other eigenvalues are then scaled according to eigenvalue
621+
prominence.
620622
:type max_eig_ms: int
621623
:param max_sval_plot: Maximum number of singular values to plot.
622624
:type max_sval_plot: int
@@ -792,8 +794,7 @@ def plot_summary(
792794
# Plot modes in 2D.
793795
else:
794796
mode = lead_modes[:, idx].reshape(*snapshots_shape, order=order)
795-
# Multiply by factor of 0.9 to intensify the plotted image.
796-
vmax = 0.9 * np.abs(mode.real).max()
797+
vmax = np.abs(mode.real).max()
797798
im = ax.imshow(mode.real, vmax=vmax, vmin=-vmax, cmap=mode_cmap)
798799
# Align the colorbar with the plotted image.
799800
divider = make_axes_locatable(ax)
@@ -812,7 +813,7 @@ def plot_summary(
812813
dynamics_range = dynamics_data.max() - dynamics_data.min()
813814
# Re-adjust ylim if dynamics oscillations are extremely small.
814815
if dynamics_range / np.abs(np.average(dynamics_data)) < 1e-4:
815-
ax.set_ylim([0.0, 2 * np.average(dynamics_data)])
816+
ax.set_ylim(np.sort([0.0, 2 * np.average(dynamics_data)]))
816817

817818
# Padding between elements.
818819
if tight_layout_kwargs is None:

0 commit comments

Comments
 (0)