{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Plotting in polar, decorated\n\nAn example showing how to plot in polar coordinate, and some\ndecorations.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\n\nimport matplotlib\nimport matplotlib.pyplot as plt\n\n\nplt.subplot(1, 1, 1, polar=True)\n\nN = 20\ntheta = np.arange(0.0, 2 * np.pi, 2 * np.pi / N)\nrng = np.random.default_rng()\nradii = 10 * rng.random(N)\nwidth = np.pi / 4 * rng.random(N)\nbars = plt.bar(theta, radii, width=width, bottom=0.0)\njet = matplotlib.colormaps[\"jet\"]\n\nfor r, bar in zip(radii, bars, strict=True):\n    bar.set_facecolor(jet(r / 10.0))\n    bar.set_alpha(0.5)\nplt.gca().set_xticklabels([])\nplt.gca().set_yticklabels([])\n\n\nplt.text(\n    -0.2,\n    1.02,\n    \" Polar Axis                  \\n\",\n    horizontalalignment=\"left\",\n    verticalalignment=\"top\",\n    size=\"xx-large\",\n    bbox={\"facecolor\": \"white\", \"alpha\": 1.0},\n    transform=plt.gca().transAxes,\n)\n\nplt.text(\n    -0.2,\n    1.01,\n    \"\\n\\n Plot anything using polar axis \",\n    horizontalalignment=\"left\",\n    verticalalignment=\"top\",\n    size=\"large\",\n    transform=plt.gca().transAxes,\n)\n\nplt.show()"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.12.11"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}