36 lines
889 B
Python
36 lines
889 B
Python
import matplotlib.pyplot as plt
|
|
|
|
from metro1_data import tas, exp_costs
|
|
|
|
# Update matplotlib parameters.
|
|
params = {'text.usetex': True,
|
|
'figure.dpi': 200,
|
|
'font.size': 14,
|
|
'font.serif': [],
|
|
'font.sans-serif': [],
|
|
'font.monospace': [],
|
|
'axes.labelsize': 16,
|
|
'axes.titlesize': 18,
|
|
'axes.linewidth': .6,
|
|
'legend.fontsize': 14,
|
|
'xtick.labelsize': 12,
|
|
'ytick.labelsize': 12,
|
|
'font.family': 'serif'}
|
|
plt.rcParams.update(params)
|
|
|
|
plt.figure(figsize=(7, 5))
|
|
|
|
plt.plot(tas, exp_costs, 'o-', color='blue')
|
|
|
|
idx = 3
|
|
plt.fill([tas[idx], tas[idx], tas[idx+1], tas[idx+1]],
|
|
[0, exp_costs[idx], exp_costs[idx+1], 0],
|
|
color='blue', alpha=.3)
|
|
|
|
plt.xlabel('$ta$')
|
|
plt.ylabel(r'$\exp(-c/\mu)$')
|
|
plt.xlim(tas[0], tas[-1])
|
|
plt.ylim(bottom=0)
|
|
plt.tight_layout()
|
|
plt.show()
|