{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\nSubplot grid\n=============\n\nAn example showing the subplot grid in matplotlib.\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "import matplotlib.pyplot as plt\n\nplt.figure(figsize=(6, 4))\nplt.subplot(2, 2, 1)\nplt.xticks(())\nplt.yticks(())\nplt.text(0.5, 0.5, 'subplot(2,2,1)', ha='center', va='center',\n size=20, alpha=.5)\n\nplt.subplot(2, 2, 2)\nplt.xticks(())\nplt.yticks(())\nplt.text(0.5, 0.5, 'subplot(2,2,2)', ha='center', va='center',\n size=20, alpha=.5)\n\nplt.subplot(2, 2, 3)\nplt.xticks(())\nplt.yticks(())\n\nplt.text(0.5, 0.5, 'subplot(2,2,3)', ha='center', va='center',\n size=20, alpha=.5)\n\nplt.subplot(2, 2, 4)\nplt.xticks(())\nplt.yticks(())\nplt.text(0.5, 0.5, 'subplot(2,2,4)', ha='center', va='center',\n size=20, alpha=.5)\n\nplt.tight_layout()\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" } } } }