{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Code taken from Software Carpentry's [python-novice-inflammation lesson](http://swcarpentry.github.io/python-novice-inflammation/01-numpy.html)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%matplotlib inline\n", "import numpy" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "data = numpy.loadtxt(fname='data/inflammation-01.csv', delimiter=',')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot\n", "image = matplotlib.pyplot.imshow(data)\n", "matplotlib.pyplot.show(image)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "ave_inflammation = data.mean(axis=0)\n", "ave_plot = matplotlib.pyplot.plot(ave_inflammation)\n", "matplotlib.pyplot.show(ave_plot)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 0 }