{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\nA simple, good-looking plot\n===========================\n\nDemoing some simple features of matplotlib\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "import numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nfig = plt.figure(figsize=(5, 4), dpi=72)\naxes = fig.add_axes([0.01, 0.01, .98, 0.98])\nX = np.linspace(0, 2, 200, endpoint=True)\nY = np.sin(2*np.pi*X)\nplt.plot(X, Y, lw=2)\nplt.ylim(-1.1, 1.1)\nplt.grid()\n\nplt.show()" ], "outputs": [], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 2", "name": "python2", "language": "python" }, "language_info": { "mimetype": "text/x-python", "nbconvert_exporter": "python", "name": "python", "file_extension": ".py", "version": "2.7.12", "pygments_lexer": "ipython2", "codemirror_mode": { "version": 2, "name": "ipython" } } } }