{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# pcolormesh(X, Y, Z)\n\n`~.axes.Axes.pcolormesh` is more flexible than `~.axes.Axes.imshow` in that\nthe x and y vectors need not be equally spaced (indeed they can be skewed).\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import matplotlib.pyplot as plt\nimport numpy as np\n\nplt.style.use('_mpl-gallery-nogrid')\n\n# make data with uneven sampling in x\nx = [-3, -2, -1.6, -1.2, -.8, -.5, -.2, .1, .3, .5, .8, 1.1, 1.5, 1.9, 2.3, 3]\nX, Y = np.meshgrid(x, np.linspace(-3, 3, 128))\nZ = (1 - X/2 + X**5 + Y**3) * np.exp(-X**2 - Y**2)\n\n# plot\nfig, ax = plt.subplots()\n\nax.pcolormesh(X, Y, Z, vmin=-0.5, vmax=1.0)\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.10.4"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}