.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/plot_06_polar_views.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_examples_plot_06_polar_views.py: Viewing Polar Axes ================== Views also support viewing polar axes. .. GENERATED FROM PYTHON SOURCE LINES 7-30 .. image-sg:: /examples/images/sphx_glr_plot_06_polar_views_001.png :alt: plot 06 polar views :srcset: /examples/images/sphx_glr_plot_06_polar_views_001.png :class: sphx-glr-single-img .. code-block:: default :lineno-start: 8 import numpy as np import matplotlib.pyplot as plt from matplotview import view # Create the data... r = np.arange(0, 2, 0.01) theta = 2 * np.pi * r fig, (ax, ax2) = plt.subplots(1, 2, subplot_kw=dict(projection='polar')) ax.plot(theta, r) ax.set_rmax(2) ax.set_rticks([0.5, 1, 1.5, 2]) # Less radial ticks ax.set_rlabel_position(-22.5) # Move radial labels away from plotted line # Include a grid ax.grid(True) # ax2 is now zoomed in on ax. view(ax2, ax) fig.tight_layout() fig.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.519 seconds) .. _sphx_glr_download_examples_plot_06_polar_views.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_06_polar_views.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_06_polar_views.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_