@@ -746,8 +746,7 @@ def plot_summary(
746746 dt = dmd .original_time ["dt" ]
747747 except AttributeError :
748748 warnings .warn (
749- "No time information available. "
750- "Using dt = 1 and t0 = 0."
749+ "No time information available. " "Using dt = 1 and t0 = 0."
751750 )
752751 time = np .arange (dmd .snapshots .shape [- 1 ])
753752 dt = 1.0
@@ -830,7 +829,9 @@ def plot_summary(
830829 eig_axes [2 ].axvline (x = 0 , c = "k" , lw = 1 )
831830 eig_axes [2 ].axhline (y = 0 , c = "k" , lw = 1 )
832831 eig_axes [2 ].axis ("equal" )
833- eig_axes [2 ].set_title ("Continuous-time Eigenvalues" , fontsize = title_fontsize )
832+ eig_axes [2 ].set_title (
833+ "Continuous-time Eigenvalues" , fontsize = title_fontsize
834+ )
834835 if flip_continuous_axes :
835836 eig_axes [2 ].set_xlabel (r"$Im(\omega)$" , fontsize = label_fontsize )
836837 eig_axes [2 ].set_ylabel (r"$Re(\omega)$" , fontsize = label_fontsize )
@@ -849,22 +850,30 @@ def plot_summary(
849850 ax .plot (
850851 eigs [idx ].real ,
851852 eigs [idx ].imag ,
852- "o" , c = main_colors [i ], ms = ms_vals [idx ], mec = "k" ,
853+ "o" ,
854+ c = main_colors [i ],
855+ ms = ms_vals [idx ],
856+ mec = "k" ,
853857 )
854858 mode_colors [idx ] = main_colors [i ]
855859 for idx in other_eigs :
856860 ax .plot (
857861 eigs [idx ].real ,
858862 eigs [idx ].imag ,
859- "o" , c = rank_color , ms = ms_vals [idx ], mec = "k" ,
863+ "o" ,
864+ c = rank_color ,
865+ ms = ms_vals [idx ],
866+ mec = "k" ,
860867 )
861868
862869 # PLOTS 4-6: Plot the DMD modes.
863870 if x is None :
864871 x = np .arange (snapshots_shape [0 ])
865872
866873 for i , (ax , idx ) in enumerate (zip (mode_axes , index_modes )):
867- ax .set_title (f"Mode { idx + 1 } " , c = mode_colors [idx ], fontsize = title_fontsize )
874+ ax .set_title (
875+ f"Mode { idx + 1 } " , c = mode_colors [idx ], fontsize = title_fontsize
876+ )
868877 # Plot modes in 1-D.
869878 if len (snapshots_shape ) == 1 :
870879 ax .plot (x , lead_modes [:, idx ].real , c = mode_color )
@@ -875,7 +884,9 @@ def plot_summary(
875884 ygrid , xgrid = np .meshgrid (y , x )
876885 mode = lead_modes [:, idx ].reshape (* snapshots_shape , order = order )
877886 vmax = np .abs (mode .real ).max ()
878- im = ax .pcolormesh (xgrid , ygrid , mode .real , vmax = vmax , vmin = - vmax , cmap = mode_cmap )
887+ im = ax .pcolormesh (
888+ xgrid , ygrid , mode .real , vmax = vmax , vmin = - vmax , cmap = mode_cmap
889+ )
879890 # Align the colorbar with the plotted image.
880891 divider = make_axes_locatable (ax )
881892 cax = divider .append_axes ("right" , size = "3%" , pad = 0.05 )
@@ -884,7 +895,9 @@ def plot_summary(
884895 # PLOTS 7-9: Plot the DMD mode dynamics.
885896 for i , (ax , idx ) in enumerate (zip (dynamics_axes , index_modes )):
886897 dynamics_data = lead_dynamics [idx ].real
887- ax .set_title ("Mode Dynamics" , c = mode_colors [idx ], fontsize = title_fontsize )
898+ ax .set_title (
899+ "Mode Dynamics" , c = mode_colors [idx ], fontsize = title_fontsize
900+ )
888901 ax .plot (time , dynamics_data , c = dynamics_color )
889902 ax .set_xlabel ("Time" , fontsize = label_fontsize )
890903
0 commit comments