{ "cells": [ { "cell_type": "markdown", "id": "d888acdc-7426-48f2-8de0-c45c19896ff7", "metadata": {}, "source": [ "# Plotting\n", "\n", "The plotting functionality of `xyzpy` is oriented towards quickly getting an\n", "overview of high-dimensional gridded data. This is provided by a simple single\n", "method interface (with autocorrected kwargs), that allows the\n", "dimensions/coordinates to be encoded to the various visual properties in either\n", "a ***line-plot*** (the main focus), ***scatter-plot***, ***histogram***, or\n", "***heatmap***. The method is accessed (once `xyzpy` is imported) with the\n", "[`dataset.xyz.plot()`](xyzpy.plot.infiniplot.infiniplot) method. For this\n", "example we'll first generate a basic example dataset to plot, with 5 dimensions\n", "and 2 data variables:" ] }, { "cell_type": "code", "execution_count": 1, "id": "fa675011", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|##########| 1836/1836 [00:00<00:00, 1544472.95it/s]\n" ] }, { "data": { "text/html": [ "
<xarray.Dataset> Size: 30kB\n",
"Dimensions: (x: 17, p: 3, delta: 6, C: 3, amp: 2)\n",
"Coordinates:\n",
" * x (x) float64 136B -2.0 -1.75 -1.5 -1.25 -1.0 ... 1.25 1.5 1.75 2.0\n",
" * p (p) int64 24B 1 2 3\n",
" * delta (delta) float64 48B 0.0 0.2 0.4 0.6 0.8 1.0\n",
" * C (C) float64 24B -2.0 1.0 4.0\n",
" * amp (amp) float64 16B -1.0 1.0\n",
"Data variables:\n",
" fx (x, p, delta, C, amp) float64 15kB 0.0 -4.0 3.0 ... 2.0 3.0 5.0\n",
" dfx (x, p, delta, C, amp) float64 15kB -1.0 1.0 -1.0 ... 3.0 -3.0 3.0