# -*- coding: utf-8 -*- """ Created on Tue Jun 4 21:31:55 2019 @author: finnh """ import numpy as np import matplotlib.pyplot as plt mnd = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) temp = np.array([-3, -2, 2, 7, 11, 15, 17, 16, 12, 6, 2, -3]) mean_temp = np.mean(temp) # Mean value plt.close('all') plt.figure('Monthly mean temp i Skien') plt.plot(mnd, temp, 'o-') plt.xlim(0, 13) plt.ylim(-5, 20) plt.title('Monthly mean temp in Skien year 2005-2015') plt.xlabel('Month no.') plt.ylabel('[Deg C]') plt.grid() plt.show() plt.savefig('temp_skien.pdf')