diff --git a/data/config-nb.ini b/data/config-nb.ini index 1f2bdc9..9b94756 100644 --- a/data/config-nb.ini +++ b/data/config-nb.ini @@ -15,7 +15,6 @@ out=bathy.npy step=1 left=0 right=150 -#plot=True [artha] lat=43.398450 diff --git a/data/config-of.ini b/data/config-of.ini index 1de5686..e6b6b94 100644 --- a/data/config-of.ini +++ b/data/config-of.ini @@ -15,7 +15,6 @@ out=bathy.npy step=0.5 left=0 right=-1000 -plot=True [artha] lat=43.398450 diff --git a/data/config.ini b/data/config.ini index bc4cbb2..6fd5983 100644 --- a/data/config.ini +++ b/data/config.ini @@ -15,7 +15,6 @@ out=bathy.npy step=1 left=0 right=150 -#plot=True [artha] lat=43.398450 diff --git a/data/processing/projection.py b/data/processing/projection.py index da8f5ae..7112d32 100644 --- a/data/processing/projection.py +++ b/data/processing/projection.py @@ -6,10 +6,7 @@ import pathlib import numpy as np from scipy import interpolate -try: - import matplotlib.pyplot as plt -except ImportError: - plt = None +import matplotlib.pyplot as plt from .lambert import Lambert @@ -133,8 +130,7 @@ np.savetxt(out_root.joinpath("hstru.dat"), hstru[::-1], newline=" ") np.savetxt(out_root.joinpath("poro.dat"), poro[::-1], newline=" ") np.savetxt(out_root.joinpath("psize.dat"), psize[::-1], newline=" ") -if plt is not None and config.getboolean("out", "plot", fallback=False): - fig, ax = plt.subplots() - ax.plot(-x, z, color="k") - ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2) - fig.savefig(out_root.joinpath("bathy.pdf")) +fig, ax = plt.subplots() +ax.plot(-x, z, color="k") +ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2) +fig.savefig(out_root.joinpath("bathy.pdf"))