{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Simple Axisline\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import matplotlib.pyplot as plt\n\nfrom mpl_toolkits.axisartist.axislines import AxesZero\n\nfig = plt.figure()\nfig.subplots_adjust(right=0.85)\nax = fig.add_subplot(axes_class=AxesZero)\n\n# make right and top axis invisible\nax.axis[\"right\"].set_visible(False)\nax.axis[\"top\"].set_visible(False)\n\n# make xzero axis (horizontal axis line through y=0) visible.\nax.axis[\"xzero\"].set_visible(True)\nax.axis[\"xzero\"].label.set_text(\"Axis Zero\")\n\nax.set_ylim(-2, 4)\nax.set_xlabel(\"Label X\")\nax.set_ylabel(\"Label Y\")\n# Or:\n# ax.axis[\"bottom\"].label.set_text(\"Label X\")\n# ax.axis[\"left\"].label.set_text(\"Label Y\")\n\n# make new (right-side) yaxis, but with some offset\nax.axis[\"right2\"] = ax.new_fixed_axis(loc=\"right\", offset=(20, 0))\nax.axis[\"right2\"].label.set_text(\"Label Y2\")\n\nax.plot([-2, 3, 2])\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.14.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}