{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Contour plot with hatches\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pylab as pyl\n\nimport pygeode as pyg\nimport numpy as np\nfrom pygeode.tutorial import t1\n\nax = pyg.plot.AxesWrapper()\n\n# Pass **kwargs to matplotlib contourf\npyg.vcontour(t1.Temp, clines=5, clevels=5, colors='k', axes=ax)\npyg.vcontour(t1.Temp, clevels=5, cmap='BuGn', axes=ax)\nax.clabel(ax.plots[0], colors='k', fmt='%d', fontsize=14)\npyg.vcontour(t1.Temp, levels=[200,280], linewidth=0, hatches=['..'], alpha=0, axes=ax)\n\nax.setp(title = 'Plot specific contours and hatching')\n\npyl.ion()\nax.render(1)" ] } ], "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.8.12" } }, "nbformat": 4, "nbformat_minor": 0 }