#!/usr/bin/env python # coding: utf-8 # In[1]: from IPython.core.display import HTML def css_styling(): sheet = '../css/custom.css' styles = open(sheet, "r").read() return HTML(styles) css_styling() # # Basics Refresher # This exercise centres around the loading and plotting data from a file while using Numpy functions. # You have been given two dimensional data within three csv files and are required to plot the average, maximum and minimum of the columns of that data. # # # Looping over the filenames given: # 1. Read the file-name using the Numpy `loadtxt` function (use `help` if you've forgotten how this works!) # 2. Find the mean, max and minimum of each column in the data using numpy functions (use `axis=0`) # 3. Plot the mean minimum and maximum of each column with respect to the row number # * A neat way to do this could be to use a 1 by 3 layout of subplots, i.e. `fig.add_subplot(1, 3, i)`, $i \in [1, 2, 3]$ for plotting the mean, max and min # * Try adding a meaningful label to the y axes # In[2]: import numpy as np import matplotlib.pyplot as plt get_ipython().run_line_magic('matplotlib', 'inline') # In[3]: filename = ['data/inflammation-01.csv','data/inflammation-02.csv' ,'data/inflammation-03.csv'] # In[4]: # Implement your work here: # ## [Solutions](../soln/00-Basics_refresher.ipynb)