diff --git a/examples/rise.css b/examples/rise.css index dc4779b5..c10189b8 100644 --- a/examples/rise.css +++ b/examples/rise.css @@ -61,3 +61,13 @@ div.cell.code_cell.rendered, div.input_area { div.text_cell_render.rendered_html { color: #5050b0; } + +/* + * this is to void xarray's html output to show the fallback textual representation + * see also + * xarray.md and + * https://github.com/damianavila/RISE/issues/594 + */ +.reveal pre.xr-text-repr-fallback { + display: none; +} diff --git a/examples/xarray.md b/examples/xarray.md new file mode 100644 index 00000000..f481d1e8 --- /dev/null +++ b/examples/xarray.md @@ -0,0 +1,28 @@ +--- +jupytext: + text_representation: + extension: .md + format_name: myst + format_version: 0.13 + jupytext_version: 1.11.1 +kernelspec: + display_name: Python 3 + language: python + name: python3 +--- + +```{code-cell} ipython3 +import xarray as xr +``` + +this is to illustrate a useful patch for dealing with xarray's `_repr_html_()` + +see also + +* https://github.com/damianavila/RISE/issues/594 +* `rise.css` in this folder + +```{code-cell} ipython3 +ds = xr.tutorial.open_dataset('air_temperature') +ds +```