.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "intro/matplotlib/auto_examples/plot_polar.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_intro_matplotlib_auto_examples_plot_polar.py: Plotting in polar coordinnates =============================== A simple example showing how to plot in polar coordinnates with matplotlib. .. GENERATED FROM PYTHON SOURCE LINES 8-27 .. image-sg:: /intro/matplotlib/auto_examples/images/sphx_glr_plot_polar_001.png :alt: plot polar :srcset: /intro/matplotlib/auto_examples/images/sphx_glr_plot_polar_001.png :class: sphx-glr-single-img .. code-block:: default import numpy as np import matplotlib.pyplot as plt ax = plt.axes([0.025, 0.025, 0.95, 0.95], polar=True) N = 20 theta = np.arange(0.0, 2 * np.pi, 2 * np.pi / N) radii = 10 * np.random.rand(N) width = np.pi / 4 * np.random.rand(N) bars = plt.bar(theta, radii, width=width, bottom=0.0) for r,bar in zip(radii, bars): bar.set_facecolor(plt.cm.jet(r/10.)) bar.set_alpha(0.5) ax.set_xticklabels([]) ax.set_yticklabels([]) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.085 seconds) .. _sphx_glr_download_intro_matplotlib_auto_examples_plot_polar.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_polar.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_polar.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_