Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/CHRU2014/paper_incorrect_averaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def __init__(self, fe_num):
plt.title(" V.-R.-H. on moduli")
plt.xlabel("Pressure (GPa)")
plt.ylabel("Shear Velocity Vs (km/s)")
fig.set_tight_layout(True)
fig.set_layout_engine("tight")
if "RUNNING_TESTS" not in globals():
plt.savefig("example_incorrect_averaging.pdf", bbox_inches="tight")
plt.show()
2 changes: 1 addition & 1 deletion contrib/CHRU2014/paper_opt_pv.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def material_error(x):
# plt.savefig("opt_pv_4.pdf",bbox_inches='tight')
# plt.show()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
if "RUNNING_TESTS" not in globals():
plt.savefig("paper_opt_pv.pdf", bbox_inches="tight")
plt.show()
6 changes: 3 additions & 3 deletions contrib/anisotropic_eos/cubic_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def cubic_misfit(x):
for i in range(4):
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_stiffness_tensor.pdf")
fig2.set_tight_layout(True)
fig2.set_layout_engine("tight")
fig2.savefig("periclase_shear_modulus.pdf")
plt.show()

Expand Down Expand Up @@ -270,6 +270,6 @@ def cubic_misfit(x):

ax[0].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_properties_1bar.pdf")
plt.show()
6 changes: 3 additions & 3 deletions contrib/anisotropic_eos/cubic_fitting_second_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ def cubic_misfit(x, imin):
for i in range(4):
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_stiffness_tensor.pdf")
fig2.set_tight_layout(True)
fig2.set_layout_engine("tight")
fig2.savefig("periclase_shear_modulus.pdf")
plt.show()

Expand Down Expand Up @@ -390,6 +390,6 @@ def cubic_misfit(x, imin):

ax[0].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_properties_1bar.pdf")
plt.show()
6 changes: 3 additions & 3 deletions contrib/anisotropic_eos/cubic_fitting_second_form_atherm.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ def cubic_misfit(x, imin):
for i in range(4):
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_stiffness_tensor.pdf")
fig2.set_tight_layout(True)
fig2.set_layout_engine("tight")
fig2.savefig("periclase_shear_modulus.pdf")
plt.show()

Expand Down Expand Up @@ -340,6 +340,6 @@ def cubic_misfit(x, imin):

ax[0].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_properties_1bar.pdf")
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ def cubic_misfit(x, imin):
for i in range(4):
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_stiffness_tensor.pdf")
fig2.set_tight_layout(True)
fig2.set_layout_engine("tight")
fig2.savefig("periclase_shear_modulus.pdf")
plt.show()

Expand Down Expand Up @@ -404,6 +404,6 @@ def cubic_misfit(x, imin):

ax[0].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("periclase_properties_1bar.pdf")
plt.show()
6 changes: 3 additions & 3 deletions contrib/anisotropic_eos/orthorhombic_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def orthorhombic_misfit(x, imin):
ax[0].set_ylabel("Thermal expansivity (10$^{-5}$/K)")
ax[1].set_ylabel("Relative length change ($10^{4} (x/x_0 - 1)$)")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("olivine_expansivities.pdf")
plt.show()

Expand Down Expand Up @@ -573,7 +573,7 @@ def orthorhombic_misfit(x, imin):
ax[i].set_ylabel(f"$C_{{N {p}{q}}}$ (GPa)")
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("olivine_CNijs.pdf")
plt.show()

Expand All @@ -597,6 +597,6 @@ def orthorhombic_misfit(x, imin):
cbar = fig.colorbar(contour_sets[i], ax=ax[i], ticks=ticks[i], pad=0.1)
cbar.add_lines(lines[i])

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig(f"olivine_seismic_properties_{P/1.e9:.2f}_GPa_{int(T)}_K.pdf")
plt.show()
6 changes: 3 additions & 3 deletions contrib/anisotropic_eos/orthorhombic_fitting_second_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def orthorhombic_misfit(x, imin):
ax[0].set_ylabel("Thermal expansivity (10$^{-5}$/K)")
ax[1].set_ylabel("Relative length change ($10^{4} (x/x_0 - 1)$)")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("olivine_expansivities.pdf")
plt.show()

Expand Down Expand Up @@ -579,7 +579,7 @@ def orthorhombic_misfit(x, imin):
ax[i].set_ylabel(f"$C_{{N {p}{q}}}$ (GPa)")
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("olivine_CNijs.pdf")
plt.show()

Expand All @@ -603,6 +603,6 @@ def orthorhombic_misfit(x, imin):
cbar = fig.colorbar(contour_sets[i], ax=ax[i], ticks=ticks[i], pad=0.1)
cbar.add_lines(lines[i])

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig(f"olivine_seismic_properties_{P/1.e9:.2f}_GPa_{int(T)}_K.pdf")
plt.show()
10 changes: 5 additions & 5 deletions contrib/anisotropic_plagioclase/plagioclase_model_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@

ax[0].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("plag_V_KT.pdf")

# Elastic stiffness data
Expand Down Expand Up @@ -229,7 +229,7 @@
ax[i].set_xlabel("$p_{an}$")
ax[i].set_ylabel("$C_{Nij}$ (GPa)")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("plag_stiffnesses.pdf")

# psi
Expand Down Expand Up @@ -260,7 +260,7 @@
ax[i].set_xlabel("$p_{an}$")
ax[i].set_ylabel("$S_{Nij} / \\beta_{NR}$")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("plag_psi.pdf")

# Cell parameters
Expand Down Expand Up @@ -309,7 +309,7 @@
ax[i].set_ylabel(f"$\\{label}$ ($^{{\\circ}}$)")
ax[i].set_xlabel("$p_{an}$")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("plag_cell_parameters.pdf")

# Compressibilities
Expand Down Expand Up @@ -370,6 +370,6 @@
ax[axi].set_ylabel(f"$\\beta_{{T{axi+1}}}$ (GPa$^{{-1}}$)")
ax[axi].set_xlabel("$p_{an}$")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("plag_compressibilities.pdf")
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,6 @@ def strains(P_GPa):
ax[i].set_xlabel("Pressure (GPa)")
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/Carpenter_2000_model.pdf")
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,6 @@ def strains(P_GPa):
ax[i].set_xlabel("Pressure (GPa)")
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/Zhang_2021_model.pdf")
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ def correlation_from_covariance(covariance):
)


fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/correlation_matrix.pdf")
plt.show()
26 changes: 13 additions & 13 deletions contrib/anisotropic_stishovite/stishovite_model_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
ax[0].set_ylabel("Temperature (K)")
ax[0].set_xlim(0.0, 125.0)
ax[0].set_ylim(0.0, 4000.0)
fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/Fischer_Andrault_splitting.pdf")
plt.show()

Expand Down Expand Up @@ -434,7 +434,7 @@ def dlncdlnV_linear(lnV, grad=1.2):

ax[1].set_ylim(-1.0, 1.0)
ax[1].legend(fontsize=8)
fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/stv_cell_properties.pdf")
plt.show()

Expand Down Expand Up @@ -545,7 +545,7 @@ def dlncdlnV_linear(lnV, grad=1.2):
ax[0].set_xlabel("Depth (km)")
ax[0].set_ylabel("Velocity (km/s)")
ax[0].legend(fontsize=8.0)
fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig("figures/stv_isotropic_velocities.pdf")
if show_plots_one_by_one:
plt.show()
Expand Down Expand Up @@ -611,7 +611,7 @@ def dlncdlnV_linear(lnV, grad=1.2):
cbar = fig.colorbar(contour_sets[i], ax=ax[i], ticks=ticks[i], pad=0.1)
cbar.add_lines(lines[i])

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig(
f"figures/stishovite_seismic_properties_{P/1.e9:.2f}_GPa_{int(T)}_K.pdf"
)
Expand Down Expand Up @@ -834,7 +834,7 @@ def dlncdlnV_linear(lnV, grad=1.2):
ax_lnabc[1].set_ylabel("$\\ln(c)$ (cm/mol$^{\\frac{1}{3}}$)")
handles, labels = ax_lnabc[1].get_legend_handles_labels()
ax_lnabc[1].legend(handles[::-1], labels[::-1], fontsize=8)
fig_lnabc.set_tight_layout(True)
fig_lnabc.set_layout_engine("tight")
fig_lnabc.savefig("figures/stv_lnabc.pdf")
if show_plots_one_by_one:
plt.show()
Expand Down Expand Up @@ -884,7 +884,7 @@ def dlncdlnV_linear(lnV, grad=1.2):
ax_G2.set_xlim(-1.5, 1.5)
ax_G2.tick_params(axis="x")
ax_G2.set_xlabel("$Q$")
fig_G.set_tight_layout(True)
fig_G.set_layout_engine("tight")
fig_G.savefig("figures/stv_G.pdf")
if show_plots_one_by_one:
plt.show()
Expand Down Expand Up @@ -1066,9 +1066,9 @@ def Q_misfit(args):
ax_abc[1].set_xlim(0.0, 150.0)
ax_Q[0].set_xlim(0.0, 150.0)

fig_Q.set_tight_layout(True)
fig_V.set_tight_layout(True)
fig_abc.set_tight_layout(True)
fig_Q.set_layout_engine("tight")
fig_V.set_layout_engine("tight")
fig_abc.set_layout_engine("tight")

fig_Q.savefig("figures/stv_Q.pdf")
fig_V.savefig("figures/stv_V.pdf")
Expand Down Expand Up @@ -1185,8 +1185,8 @@ def Q_misfit(args):
ax_relaxed[i].set_ylabel("Modulus (GPa)")
ax_Q0[i].set_ylabel("Modulus (GPa)")

fig_relaxed.set_tight_layout(True)
fig_Q0.set_tight_layout(True)
fig_relaxed.set_layout_engine("tight")
fig_Q0.set_layout_engine("tight")

fig_relaxed.savefig("figures/stv_relaxed.pdf")

Expand Down Expand Up @@ -1295,8 +1295,8 @@ def Q_misfit(args):
ax_relaxed[i].set_ylabel("Compliance (1/GPa)")
ax_Q0[i].set_ylabel("Compliance (1/GPa)")

fig_relaxed.set_tight_layout(True)
fig_Q0.set_tight_layout(True)
fig_relaxed.set_layout_engine("tight")
fig_Q0.set_layout_engine("tight")

fig_relaxed.savefig("figures/stv_relaxed_ST.pdf")

Expand Down
2 changes: 1 addition & 1 deletion contrib/ipython/Create_1D_ASPECT_profile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"\n",
"ax_T.legend(loc='lower right',prop={'size':8})\n",
"\n",
"fig.set_tight_layout(True)"
"fig.set_layout_engine('tight')"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,6 @@ def diff_pot(Q):

ax[j_px].plot(pMg1s, pMg2s, linestyle=ls[k], c=cs[k], zorder=105)

fig.tight_layout()
fig.set_layout_engine("tight")
fig.savefig("energy_entropy_2_site_ordering.pdf")
plt.show()
2 changes: 1 addition & 1 deletion contrib/spock_eos/Au_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def Kdprime_0K_0_MACAW(params):
)

ax[2].legend()
fig.set_tight_layout(True)
fig.set_layout_engine("tight")

# Save and show the figure
fig.savefig("figures/Au_comparison.pdf")
Expand Down
2 changes: 1 addition & 1 deletion contrib/spock_eos/fit_spock.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
)

ax[0].legend()
fig.set_tight_layout(True)
fig.set_layout_engine("tight")
fig.savefig(f"figures/{basename}_eos_fit.pdf")

# Create a pandas dataframe from the data and print it
Expand Down
6 changes: 3 additions & 3 deletions examples/example_anisotropic_mineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
ax[0].set_ylabel("Thermal expansivity (10$^{-5}$/K)")
ax[1].set_ylabel("Relative length change ($10^{4} (x/x_0 - 1)$)")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
# fig.savefig('example_anisotropic_mineral_Figure_1.png')
plt.show()

Expand Down Expand Up @@ -193,7 +193,7 @@
ax[i].set_ylabel(f"$C_{{N {p}{q}}}$ (GPa)")
ax[i].legend()

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
# fig.savefig('example_anisotropic_mineral_Figure_2.png')
plt.show()

Expand Down Expand Up @@ -222,5 +222,5 @@
cbar = fig.colorbar(contour_sets[i], ax=ax[i], ticks=ticks[i], pad=0.1)
cbar.add_lines(lines[i])

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
plt.show()
2 changes: 1 addition & 1 deletion examples/example_anisotropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def plot_anisotropic_seismic_properties(mineral):
cbar = fig.colorbar(im[i], ax=ax[i], ticks=ticks)
cbar.add_lines(lines)

fig.set_tight_layout(True)
fig.set_layout_engine("tight")
plt.savefig("output_figures/example_anisotropy.png")
plt.show()

Expand Down
2 changes: 1 addition & 1 deletion examples/example_elastic_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,6 @@ def mult(x, n):
ax[4].set_ylabel("Volume - $d\\mu(0.4)/dP$ (cm$^3$/mol)")
ax[5].set_ylabel("Entropy + $d\\mu(0.4)/dT$ (J/K/mol)")

fig.set_tight_layout(True)
fig.set_layout_engine("tight")

plt.show()
2 changes: 1 addition & 1 deletion examples/example_geodynamic_adiabat.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def compute_depth_gravity_profiles(
ax_beta.plot(x, compressibilities_relaxed)

ax_T.legend(loc="upper left")
fig.set_tight_layout(True)
fig.set_layout_engine("tight")

plt.show()

Expand Down
2 changes: 1 addition & 1 deletion examples/example_mineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,5 @@

ax[0].set_ylabel("Molar isobaric heat capacity (J/K/mol)")
ax[1].set_ylabel("Molar volume (cm$^3$/mol)")
fig.tight_layout()
fig.set_layout_engine("tight")
plt.show()
Loading