Skip to content

Commit

Permalink
fix: long figures bug removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sdat2 committed Sep 10, 2021
1 parent 8d33598 commit 6b12be0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
Binary file modified figures/RUN_010_profiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/RUN_010_s3d_clusters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions src/make_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,6 @@ def make_all_figures() -> None:
remove_init_var=False,
)

# Make figures A5 and A6:

# Figure A5: mean/std of profiles for salinity
prep.mean_std_plot(pcm)
plt.savefig(fig_prefix + "_mean_plot.png", bbox_inches="tight")
plt.clf()

lsty.mpl_params()

# Figure A6: effect of pca on profiles (mirrors Figure 4 in Pauthenet et al. 2017)
prep.pauth17_pca_profiles(pcm)
plt.savefig(fig_prefix + "_pca_real_space_plot.png", bbox_inches="tight")
plt.clf()

lsty.mpl_params()

# new prefixes for saving gmm cluster profiles etc.

temp_name = data_prefix + "_temp.nc"
Expand All @@ -110,6 +94,7 @@ def make_all_figures() -> None:
print(profile_ds)

prof.plot_profiles(profile_ds)
lsty.set_dim(plt.gcf())
plt.savefig(fig_prefix + "_profiles.png")
plt.clf()

Expand All @@ -128,7 +113,7 @@ def make_all_figures() -> None:
ds,
)

lsty.set_dim(plt.gcf(), ratio=1.0)
lsty.set_dim(plt.gcf())
plt.savefig(fig_prefix + "_s3d_clusters.png")
plt.clf()

Expand Down Expand Up @@ -446,3 +431,18 @@ def get_x_sobel(
)
print("$G_x$ * PC" + str(pc), "UVEL", cor)

# Make figures A5 and A6:

# Figure A5: mean/std of profiles for salinity
prep.mean_std_plot(pcm)
plt.savefig(fig_prefix + "_mean_plot.png", bbox_inches="tight")
plt.clf()

lsty.mpl_params()

# Figure A6: effect of pca on profiles (mirrors Figure 4 in Pauthenet et al. 2017)
prep.pauth17_pca_profiles(pcm)
plt.savefig(fig_prefix + "_pca_real_space_plot.png", bbox_inches="tight")
plt.clf()

lsty.mpl_params()
4 changes: 2 additions & 2 deletions src/plot_utils/latex_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ def mpl_params(quality: str = "high", use_tex: bool = True, dpi: int = 600) -> N
Examples:
Basic setting the plotting defaults::
>>> mpl_defaults()
>>> mpl_params()
Setting defaults for a jupyter notebook::
>>> mpl_defaults(use_tex=False, dpi=150)
>>> mpl_params(use_tex=False, dpi=150)
"""
print(quality)
Expand Down

0 comments on commit 6b12be0

Please sign in to comment.