Skip to content
Snippets Groups Projects
Commit 9c6ad3848f55 authored by vlabarre's avatar vlabarre
Browse files

changes for figures

parent 5dc8fd971254
No related branches found
No related tags found
1 merge request!9sources for the manuscript
Showing with 52 additions and 37 deletions
......@@ -55,6 +55,8 @@
"save_spectra_slices_omega_kh_kz_regimes.py",
)
make_fig("delta_omega_spectra")
make_fig("ratio_E_vs_Fh_ratio_one")
make_fig("seb_transition_ratio_one")
make_fig("nonlinear_ratio_one")
......
......@@ -19,7 +19,7 @@
plt.rcParams["text.usetex"] = True
plt.rcParams["text.latex.preamble"] = r"\usepackage{bm}"
cm = cm.get_cmap("jet", 100)
cm = cm.get_cmap("inferno", 100)
def plot_nlb(sim, ax):
......
......@@ -31,7 +31,7 @@
plt.rcParams["text.usetex"] = True
plt.rcParams["text.latex.preamble"] = r"\usepackage{bm}"
cm = matplotlib.cm.get_cmap("jet", 100)
cm = matplotlib.cm.get_cmap("inferno", 100)
print(sys.argv)
......
......@@ -21,5 +21,5 @@
df["Fh"],
df["Etoro"] / df["E"],
c=np.log10(df["R2"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -25,5 +25,5 @@
edgecolors="k",
s=15,
s=40,
marker="o",
vmin=-1,
vmax=4,
......@@ -41,5 +41,5 @@
df["Fh"],
(df["Epolo"] - df["EA"]) / (df["Epolo"] + df["EA"]),
c=np.log10(df["R2"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -45,5 +45,5 @@
edgecolors="k",
s=15,
s=40,
marker="o",
vmin=-1,
vmax=4,
......@@ -53,5 +53,5 @@
df_proj["Fh"],
(df_proj["Epolo"] - df_proj["EA"]) / (df_proj["Epolo"] + df_proj["EA"]),
c=np.log10(df_proj["R2"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -57,5 +57,5 @@
edgecolors="k",
s=15,
s=40,
marker="^",
label=r"Without vortical modes",
)
......@@ -74,7 +74,9 @@
fig.subplots_adjust(right=0.85, wspace=0.3)
cbar_ax = fig.add_axes([0.88, 0.15, 0.02, 0.7])
cbar = fig.colorbar(cs, cax=cbar_ax, orientation="vertical")
cbar.set_ticks([-1, 0, 1, 2, 3, 4], position="right")
#cbar.set_ticklabels([-1, 0, 1, 2, 3, 4], position="right")
cbar.set_ticks([-1, 0, 1, 2, 3, 4])
cbar.set_ticklabels([r"$-1$", r"$0$", r"$1$", r"$2$", r"$3$", r"$4$"], fontsize=14)
# cbar.set_label(r"$\log_{10}(\mathcal{R})$", fontsize = 12, rotation=0)
......
......@@ -25,5 +25,5 @@
df["Fh"],
df["Etoro"] / df["E"],
c=np.log10(df["R4"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -29,5 +29,5 @@
edgecolors="k",
s=15,
s=40,
marker="o",
vmin=-2,
vmax=3,
......@@ -45,5 +45,5 @@
df["Fh"],
(df["Epolo"] - df["EA"]) / (df["Epolo"] + df["EA"]),
c=np.log10(df["R4"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -49,5 +49,5 @@
edgecolors="k",
s=15,
s=40,
marker="o",
vmin=-2,
vmax=3,
......@@ -57,5 +57,5 @@
df_proj["Fh"],
(df_proj["Epolo"] - df_proj["EA"]) / (df_proj["Epolo"] + df_proj["EA"]),
c=np.log10(df_proj["R4"]),
cmap="jet",
cmap="inferno",
edgecolors="k",
......@@ -61,5 +61,5 @@
edgecolors="k",
s=15,
s=40,
marker="^",
label=r"Without vortical modes",
)
......@@ -77,7 +77,9 @@
fig.subplots_adjust(right=0.85, wspace=0.3)
cbar_ax = fig.add_axes([0.88, 0.15, 0.02, 0.7])
cbar = fig.colorbar(cs, cax=cbar_ax, orientation="vertical")
cbar.set_ticks([-2, -1, 0, 1, 2, 3], position="right")
cbar.set_ticks([-2, -1, 0, 1, 2, 3])
cbar.set_ticklabels([r"$-2$", r"$-1$", r"$0$", r"$1$", r"$2$", r"$3$"], fontsize=14)
# cbar.set_label(r"$\log_{10}(\mathcal{R})$", fontsize = 12, rotation=0)
......
......@@ -169,7 +169,7 @@
css = [None for i in range(6)]
fig, axes = plt.subplots(
ncols=2, nrows=3, figsize=(10, 3 * 3 * 4.5 / 4), constrained_layout=True
ncols=2, nrows=3, figsize=(10, 1.2 * 3 * 3 * 4.5 / 4), constrained_layout=True
)
ax0 = axes[0, 0]
......@@ -200,21 +200,12 @@
ax.set_yticks([])
ax0.set_title(r"Standard Navier-Stokes" + "\n" + r"$N=10$", fontsize=16)
ax1.set_title(r"Without vortical modes" + "\n" + r"$N=10$", fontsize=16)
ax2.set_title(r"$N=20$", fontsize=16)
ax3.set_title(r"$N=20$", fontsize=16)
ax4.set_title(r"$N=80$", fontsize=16)
ax5.set_title(r"$N=80$", fontsize=16)
fig.tight_layout()
fig.subplots_adjust(right=0.85)
cbar_ax = fig.add_axes([0.88, 0.28, 0.02, 0.35])
cbar = fig.colorbar(css[3], cax=cbar_ax)
cbar.set_ticks([-1.0, -0.5, 0.0, 0.5, 1.0])
cbar.set_ticklabels([r"$-1$", r"$-0.5$", r"$0$", r"$0.5$", r"$1$"], fontsize=14)
cbar.ax.set_ylabel(r"$\tilde{\mathcal{B}}$", fontsize=20)
ax0.set_title(r"Standard Navier-Stokes" + "\n" + r"$N=10$", fontsize=20)
ax1.set_title(r"Without vortical modes" + "\n" + r"$N=10$", fontsize=20)
ax2.set_title(r"$N=20$", fontsize=20)
ax3.set_title(r"$N=20$", fontsize=20)
ax4.set_title(r"$N=80$", fontsize=20)
ax5.set_title(r"$N=80$", fontsize=20)
ax0.text(2e0, 1e2, r"$k_{\rm b}$", color='k', fontsize=14)
ax0.text(4e0, 1e2, r"$k_{\eta}$", color='g', fontsize=14)
......@@ -222,6 +213,22 @@
ax0.text(3.2e1, 1e2, r"$\gamma_{\boldmath{k}} = 1$", color='m', fontsize=14)
fig.tight_layout()
fig.subplots_adjust(bottom=0.15)
#cbar_ax = fig.add_axes([0.88, 0.17, 0.02, 0.65])
cbar_ax = fig.add_axes([0.15, 0.08, 0.8, 0.01])
cbar = fig.colorbar(css[3], cax=cbar_ax, cmap=cm, orientation="horizontal")
cbar.set_label(
r"$\tilde{\mathcal{B}}$",
fontsize=20,
)
cbar.set_ticks([-1.0, -0.5, 0.0, 0.5, 1.0])
cbar.set_ticklabels([r"$-1$", r"$-0.5$", r"$0$", r"$0.5$", r"$1$"], fontsize=14)
fig.subplots_adjust(bottom=0.15, wspace=0.05, hspace=0.16)
save_fig(fig, f"fig_seb_transition_ratio_one.png")
if __name__ == "__main__":
......
......@@ -19,7 +19,7 @@
spectral_fit_kh_kz,
)
cm = matplotlib.cm.get_cmap("jet", 100)
cm = matplotlib.cm.get_cmap("inferno", 100)
# Latex
plt.rcParams["text.usetex"] = True
......@@ -186,7 +186,9 @@
cmap=cm,
orientation="vertical",
)
cbar.set_ticks([0.0, 0.2, 0.4, 0.6, 0.8, 1.0], position="top")
cbar.set_ticks([0.0, 0.2, 0.4, 0.6, 0.8, 1.0])
cbar.set_ticklabels([r"$0$", r"$0.2$", r"$0.4$", r"$0.6$", r"$0.8$", r"$1$"], fontsize=14)
cbar.set_label(r"$k_z/k_b$", fontsize=16)
......
......@@ -24,7 +24,7 @@
spectral_fit_kh_kz,
)
cm = matplotlib.cm.get_cmap("jet", 100)
cm = matplotlib.cm.get_cmap("inferno", 100)
# Latex
plt.rcParams["text.usetex"] = True
......
......@@ -26,7 +26,7 @@
save_fig,
)
cm = matplotlib.cm.get_cmap("jet", 100)
cm = matplotlib.cm.get_cmap("inferno", 100)
# Latex
plt.rcParams["text.usetex"] = True
......
......@@ -25,7 +25,7 @@
save_fig,
)
cm = matplotlib.cm.get_cmap("jet", 100)
cm = matplotlib.cm.get_cmap("inferno", 100)
# Latex
plt.rcParams["text.usetex"] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment