{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\nA example of plotting not quite right\n======================================\n\nAn \"ugly\" example of plotting.\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\nmatplotlib.rc('grid', color='black', linestyle='-', linewidth=1)\n\nfig = plt.figure(figsize=(5,4),dpi=72)\naxes = fig.add_axes([0.01, 0.01, .98, 0.98], axisbg='.75')\nX = np.linspace(0, 2, 40, endpoint=True)\nY = np.sin(2 * np.pi * X)\nplt.plot(X, Y, lw=.05, c='b', antialiased=False)\n\nplt.xticks(())\nplt.yticks(np.arange(-1., 1., 0.2))\nplt.grid()\nax = plt.gca()\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" } } } }