Skip to main content

15.11) Exercise 39 - Plot Bradford Temperature


This exercise is based on the Numpy exercise Bradford weather. You will need to do that exercise first or use the solution.
For this exercise, you’ll need to download the following file:
http://www.metoffice.gov.uk/climate/uk/stationdata/bradforddata.txt

  • Solve the Numpy exercise: Bradford weather
  • Plot tmin, tmax and tmean on the same graph
  • Save you plot as bradford_temperature.png

Tip: If you want to have the date on the x axis, you can create a date vector from the year and months with the date() function of the datetime module. Use the help() function to learn more about datetime.date().
Advanced: Modify your plot to look like the following figure.
 

Bradford monthly temperature data, from jan 2003 to jan 2013, with legend. Monthly mean of minimum daily temperature (blue dashed line), monthly mean of maximum daily temperature (red dashed line) and monthly mean temperature (black solid line).

Solution: plot_exercise_bradford_data_advanced.py