Skip to content

Commit

Permalink
deploy: 1cacaef
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc2 committed Dec 8, 2023
1 parent ac48749 commit 3905d3c
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 4,175 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 4 additions & 170 deletions _sources/notebooks/03-uxarray-vis/07-animations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,183 +11,17 @@
},
"id": "766ae3323db40ec2"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import warnings\n",
"\n",
"import holoviews as hv\n",
"import uxarray as ux\n",
"\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"hv.extension(\"bokeh\")\n",
"\n",
"file_dir = \"../../meshfiles/\""
],
"metadata": {
"collapsed": false
},
"id": "e6d8966f381f6a14"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"grid_filename_geoflow = file_dir + \"geoflow.grid.nc\"\n",
"data_filename_geoflow = file_dir + \"geoflow.data.nc\"\n",
"uxds = ux.open_dataset(grid_filename_geoflow, data_filename_geoflow)\n",
"\n",
"v1 = uxds[\"v1\"].nodal_average()"
],
"metadata": {
"collapsed": false
},
"id": "fabacde78c2027ca"
},
{
"cell_type": "markdown",
"source": [
"## Interactivity \n",
"\n",
"### Dynamic Rendering\n",
"\n",
"By setting the \"dynamic\" parameter to True, the resulting plot will dynamically re-rasterize whenever you zoom."
],
"metadata": {
"collapsed": false
},
"id": "11d050fd83cfc049"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"v1[0][0].plot.rasterize(method=\"polygon\", dynamic=True)"
],
"metadata": {
"collapsed": false
},
"id": "4c1e60b1f35ee6a3"
},
{
"cell_type": "markdown",
"source": [
"### Tools"
],
"metadata": {
"collapsed": false
},
"id": "36dd246ddcfc2220"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"v1[0][0].plot.polygons().opts(tools=[\"hover\"], width=900, height=400)"
],
"metadata": {
"collapsed": false
},
"id": "572417f981cbebcf"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"v1[0][0].plot.polygons().opts(tools=[\"hover\"], width=900, height=400)"
":::{note}\n",
"This notebook is currently under development! Please refer to the [Interactive HoloViz Visualization](https://projectpythia.org/advanced-viz-cookbook/notebooks/interactive-holoviz-mpas.html#interactive-holoviz-plots) notebook in the Advanced Visualization Cookbook.\n",
":::"
],
"metadata": {
"collapsed": false
},
"id": "dfe8e8cc3966db84"
},
{
"cell_type": "markdown",
"source": [
"An additional tool that can be selected is the 'lasso_select` tool, which similar to the `box_select` tool can be used to interactively select points."
],
"metadata": {
"collapsed": false
},
"id": "3d53a4b99cc1ec9a"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"v1[0][0].plot.points().opts(tools=[\"hover\", \"lasso_select\"], width=900, height=400)"
],
"metadata": {
"collapsed": false
},
"id": "200640779a5ebfdd"
},
{
"cell_type": "markdown",
"source": [
"### HoloMaps"
],
"metadata": {
"collapsed": false
},
"id": "bac833698a730d2a"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"%%capture\n",
"hmap = hv.HoloMap(\n",
" {\n",
" i: v1[0][i].plot.rasterize(\n",
" method=\"polygon\",\n",
" exclude_antimeridian=False,\n",
" cmap=\"coolwarm\",\n",
" title=f\"v1: Mesh Layer {i}\",\n",
" width=700,\n",
" height=350,\n",
" clim=(-10, 10),\n",
" )\n",
" for i in range(5)\n",
" },\n",
" kdims=\"Mesh Layer\",\n",
")"
],
"metadata": {
"collapsed": false
},
"id": "5a00d5599c34648b"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"hmap"
],
"metadata": {
"collapsed": false
},
"id": "b66ceaad4c6f552e"
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
},
"id": "433a5e65413f567a"
"id": "135881e235d90c09"
}
],
"metadata": {
Expand Down
Binary file modified _static/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion notebooks/01-intro/01-unstructured-grid-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ <h2>Structured Grids<a class="headerlink" href="#structured-grids" title="Permal
warnings.warn(f&#39;Downloading: {url}&#39;, DownloadWarning)
</pre></div>
</div>
<img alt="../../_images/28e434c66dcd9ef66b2e3f2d39821b98379d196757bc79b98dd2ab4e910f0ae1.png" src="../../_images/28e434c66dcd9ef66b2e3f2d39821b98379d196757bc79b98dd2ab4e910f0ae1.png" />
<img alt="../../_images/000556367cc2226a260041a1111057525fcdfbbfd3997584d142752fdd1d8be0.png" src="../../_images/000556367cc2226a260041a1111057525fcdfbbfd3997584d142752fdd1d8be0.png" />
</div>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions notebooks/01-intro/02-data-structures.html

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions notebooks/03-uxarray-vis/01-plot-api.html

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions notebooks/03-uxarray-vis/02-grid-topology.html

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions notebooks/03-uxarray-vis/03-polygons.html

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions notebooks/03-uxarray-vis/04-points.html

Large diffs are not rendered by default.

Loading

0 comments on commit 3905d3c

Please sign in to comment.