{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import hvplot.xarray # noqa" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "\n", "ds = xr.tutorial.open_dataset('rasm')\n", "ds" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`quadmesh` can be slower that `image`, but it allows you to plot values on an irregular grid by representing each value as a polygon." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ds.Tair.hvplot.quadmesh(x='xc', y='yc', geo=True, widget_location='bottom')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To reduce the render time or the size of the saved plot, use `rasterize` to aggregate the values to the pixel. It is recommended that when rasterizing geo plots, you project **before** rasterizing, by setting `project=True`." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ds.Tair.hvplot.quadmesh(x='xc', y='yc', geo=True, widget_location='bottom', rasterize=True, project=True)" ] } ], "metadata": { "language_info": { "name": "python", "pygments_lexer": "ipython3" } }, "nbformat": 4, "nbformat_minor": 2 }