# %% Import of packages import numpy as np import matplotlib.pyplot as plt # %% Data: x_array = np.arange(1980, 2023) y_obs_array = np.array([0.26,0.32,0.14,0.31,0.16,0.12, 0.18,0.32,0.39,0.27,0.45,0.40, 0.22,0.23,0.32,0.45,0.33,0.46, 0.61,0.38,0.39,0.54,0.63,0.62, 0.53,0.68,0.64,0.66,0.54,0.66, 0.72,0.61,0.65,0.68,0.75,0.90, 1.02,0.92,0.85,0.98,1.02,0.85,0.89]) # %% Plotting: plt.close('all') plt.figure(1, figsize=(12, 9)) plt.plot(x_array, y_obs_array,'b-o', label='dT') plt.legend() plt.xlim(1980, 2022) plt.ylim(0, 1.2) plt.title('Observed global temp change from reference T_r') plt.xlabel('x [year]') plt.ylabel('[deg C]') plt.grid() plt.savefig('temp_change.pdf') plt.show()