Skip to content

Commit

Permalink
Adding a tight layout option to all example scripts, to avoid text ov…
Browse files Browse the repository at this point in the history
…erlap in figures. Update of the documentation accordingly.
  • Loading branch information
NicOudart committed Apr 22, 2024
1 parent e680242 commit 1c6df51
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/PyBWE.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ plt.ylabel('Normalized amplitude')
plt.legend(['Original radar sounding','Radar sounding after BWE'], loc ='best')
plt.title('BWE application')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -386,6 +387,7 @@ plt.ylabel('Amplitude')
plt.legend(['Expected spectrum after extrapolation (real part)','Expected spectrum after extrapolation (modulus)'], loc ='best')
plt.title('Expected spectrum after extrapolation')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -415,6 +417,7 @@ plt.ylabel('Amplitude')
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum AR-extrapolation')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down
3 changes: 3 additions & 0 deletions docs/PyPBWE.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ plt.ylabel('Normalized amplitude')
plt.legend(['Original radar sounding','Radar sounding after PBWE'], loc ='best')
plt.title('PBWE application - Polar channel 11')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -448,6 +449,7 @@ plt.ylabel('Amplitude')
plt.legend(['Expected spectrum after extrapolation (real part)','Expected spectrum after extrapolation (modulus)'], loc ='best')
plt.title('Expected spectrum after extrapolation - Polar channel 11')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -488,6 +490,7 @@ plt.ylabel('Amplitude')
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum polarimetric extrapolation - Polar channel 11')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down
5 changes: 5 additions & 0 deletions docs/PySSBWE.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ plt.ylabel('Normalized amplitude')
plt.legend(['Original radar sounding','Radar sounding after SSBWE'], loc ='best')
plt.title('SSBWE application - method 1 (using the observability matrix)')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand All @@ -427,6 +428,7 @@ plt.ylabel('Normalized amplitude')
plt.legend(['Original radar sounding','Radar sounding after SSBWE'], loc ='best')
plt.title('SSBWE application - method 2 (using the controllability matrix)')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -564,6 +566,7 @@ plt.ylabel('Amplitude')
plt.legend(['Expected spectrum after extrapolation (real part)','Expected spectrum after extrapolation (modulus)'], loc ='best')
plt.title('Expected spectrum after extrapolation')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down Expand Up @@ -593,6 +596,7 @@ plt.ylabel('Amplitude')
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum state-space extrapolation - method 1 (using the observability matrix)')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand All @@ -612,6 +616,7 @@ plt.ylabel('Amplitude')
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum state-space extrapolation - method 2 (using the controllability matrix)')
plt.grid()
plt.tight_layout()
plt.show()
~~~

Expand Down
1 change: 1 addition & 0 deletions examples/script_example_PyBWE_BWE.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@
plt.legend(['Original radar sounding','Radar sounding after BWE'], loc ='best')
plt.title('BWE application')
plt.grid()
plt.tight_layout()
plt.show()
2 changes: 2 additions & 0 deletions examples/script_example_PyBWE_extrapolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
plt.legend(['Expected spectrum after extrapolation (real part)','Expected spectrum after extrapolation (modulus)'], loc ='best')
plt.title('Expected spectrum after extrapolation')
plt.grid()
plt.tight_layout()
plt.show()

#Generate a vector of frequencies for the forward and backward extrapolations:
Expand All @@ -133,4 +134,5 @@
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum AR-extrapolation')
plt.grid()
plt.tight_layout()
plt.show()
1 change: 1 addition & 0 deletions examples/script_example_PyPBWE_PBWE.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@
plt.title('PBWE application - Polar channel 11')
plt.grid()

plt.tight_layout()
plt.show()
2 changes: 2 additions & 0 deletions examples/script_example_PyPBWE_extrapolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
plt.title('Expected spectrum after extrapolation - Polar channel 11')
plt.grid()

plt.tight_layout()
plt.show()

#Generate a vector of frequencies for the forward and backward extrapolations:
Expand Down Expand Up @@ -192,4 +193,5 @@
plt.title('Spectrum polarimetric extrapolation - Polar channel 11')
plt.grid()

plt.tight_layout()
plt.show()
2 changes: 2 additions & 0 deletions examples/script_example_PySSBWE_SSBWE.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
plt.legend(['Original radar sounding','Radar sounding after SSBWE'], loc ='best')
plt.title('SSBWE application - method 1 (using the observability matrix)')
plt.grid()
plt.tight_layout()
plt.show()

#Display the original radar sounding and the SSBWE version using method 2:
Expand All @@ -135,6 +136,7 @@
plt.legend(['Original radar sounding','Radar sounding after SSBWE'], loc ='best')
plt.title('SSBWE application - method 2 (using the controllability matrix)')
plt.grid()
plt.tight_layout()
plt.show()

#Echoes properties estimation:--------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions examples/script_example_PySSBWE_extrapolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
plt.legend(['Expected spectrum after extrapolation (real part)','Expected spectrum after extrapolation (modulus)'], loc ='best')
plt.title('Expected spectrum after extrapolation')
plt.grid()
plt.tight_layout()
plt.show()

#Generate a vector of frequencies for the forward and backward extrapolations:
Expand All @@ -163,6 +164,7 @@
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum state-space extrapolation - method 1 (using the observability matrix)')
plt.grid()
plt.tight_layout()
plt.show()

#Display the original radar spectrum and the extrapolation using method 2:
Expand All @@ -180,4 +182,5 @@
plt.legend(['Original radar spectrum (real part)','Original radar spectrum (modulus)','Backward extrapolation (real part)', 'Backward extrapolation (modulus)', 'Forward extrapolation (real part)', 'Forward extrapolation (modulus)'], loc ='best')
plt.title('Spectrum state-space extrapolation - method 2 (using the controllability matrix)')
plt.grid()
plt.tight_layout()
plt.show()

0 comments on commit 1c6df51

Please sign in to comment.