{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Most examples work across multiple plotting backends, this example is also available for:\n", "\n", "* [Bokeh irregular_quadmesh](../bokeh/irregular_quadmesh.ipynb)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import holoviews as hv\n", "hv.extension('matplotlib')\n", "hv.output(fig='svg')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Declaring data\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "n = 20\n", "coords = np.linspace(-1.5, 1.5, n)\n", "X,Y = np.meshgrid(coords, coords);\n", "Qx = np.cos(Y) - np.cos(X)\n", "Qz = np.sin(Y) + np.sin(X)\n", "Z = np.sqrt(X**2 + Y**2)\n", "\n", "qmesh = hv.QuadMesh((Qx, Qz, Z))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plot" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "qmesh" ] } ], "metadata": { "language_info": { "name": "python", "pygments_lexer": "ipython3" } }, "nbformat": 4, "nbformat_minor": 2 }