9 matplotlib.rcParams[
'text.usetex'] =
True
10 matplotlib.rcParams[
'text.latex.preamble'] = [
r"\usepackage{amsmath}",
r"\usepackage{sansmath}",
r"\sansmath"]
11 matplotlib.rcParams[
'font.family'] = [
'sans-serif']
12 matplotlib.rcParams.update({
'font.size': 14})
14 import matplotlib.pyplot
as plt
16 f, ax = plt.subplots(1,2, figsize=(12,5), dpi=150)
17 plt.subplots_adjust(left=0.08, right=0.99, bottom=0.11, top=0.98, wspace=0.3, hspace=0.4)
20 Q = np.linspace(Qmin, Qmax, 100)
23 q = (qmax - qmin) / (1 + np.exp(-Q)) + qmin
26 ax[0].set_xlabel(
r"$q_{x}(\textsf{model})$", fontsize=16)
27 ax[0].set_ylabel(
r"$Q_{x}(\textsf{engine})$", fontsize=16)
28 ax[0].grid(linewidth=0.5, linestyle=
':')
32 q = qmin * np.exp((np.log(qmax) - np.log(qmin)) / (1 + np.exp(-Q)))
33 ax[1].set_xscale(
"log")
34 ax[1].xaxis.set_major_formatter(matplotlib.ticker.FuncFormatter(
lambda f, _:
'{:.16g}'.format(f)))
37 ax[1].set_xlabel(
r"$q_\textsf{aspect}(\textsf{model})$", fontsize=16)
38 ax[1].set_ylabel(
r"$Q_\textsf{aspect}(\textsf{engine})$", fontsize=16)
39 ax[1].grid(linewidth=0.5, linestyle=
':')
40 plt.savefig(
"rangetypes.svg")
41 plt.savefig(
"rangetypes.pdf")