{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Quickplot of a 2D Cube on a Map\n\nThis example demonstrates a contour plot of global air temperature. The plot\ntitle and the labels for the axes are automatically derived from the metadata.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import cartopy.crs as ccrs\nimport matplotlib.pyplot as plt\n\nimport iris\nimport iris.plot as iplt\nimport iris.quickplot as qplt\n\n\ndef main():\n    fname = iris.sample_data_path(\"air_temp.pp\")\n    temperature = iris.load_cube(fname)\n\n    # Plot #1: contourf with axes longitude from -180 to 180\n    plt.figure(figsize=(12, 5))\n    plt.subplot(121)\n    qplt.contourf(temperature, 15)\n    plt.gca().coastlines()\n\n    # Plot #2: contourf with axes longitude from 0 to 360\n    proj = ccrs.PlateCarree(central_longitude=-180.0)\n    plt.subplot(122, projection=proj)\n    qplt.contourf(temperature, 15)\n    plt.gca().coastlines()\n    iplt.show()\n\n\nif __name__ == \"__main__\":\n    main()"
      ]
    }
  ],
  "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.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}