{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\nPlotting in polar coordinnates\n===============================\n\nA simple example showing how to plot in polar coordinnates with\nmatplotlib.\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "import numpy as np\nimport matplotlib.pyplot as plt\n\nax = plt.axes([0.025, 0.025, 0.95, 0.95], polar=True)\n\nN = 20\ntheta = np.arange(0.0, 2 * np.pi, 2 * np.pi / N)\nradii = 10 * np.random.rand(N)\nwidth = np.pi / 4 * np.random.rand(N)\nbars = plt.bar(theta, radii, width=width, bottom=0.0)\n\nfor r,bar in zip(radii, bars):\n bar.set_facecolor(plt.cm.jet(r/10.))\n bar.set_alpha(0.5)\n\nax.set_xticklabels([])\nax.set_yticklabels([])\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" } } } }