import numpy as np import matplotlib.pyplot as plt # Data: t_array = np.arange(2000, 2009+1) # arange() excludes end kpi_array = np.array([75.5, 77.7, 78.7, 80.7, 81.0, 82.3, 84.2, 84.8, 88.0, 89.9]) # Plotting: plt.close('all') plt.figure(1, figsize=(12, 9)) plt.plot(t_array, kpi_array,'-bo', label='KPI') plt.legend() plt.title('Konsumprisindeks (KPI)') plt.xlabel('t [Aar]') plt.grid() # plt.savefig('prog_plot_kpi_2000_2009.pdf') plt.show()