Skip to content

Commit

Permalink
display the colormaps in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishavlin committed Jun 13, 2024
1 parent 0a587aa commit 0e36c5d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/source/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
jupytext:
text_representation:
format_name: myst
kernelspec:
display_name: Python 3
name: python3
---

# Reference

## Color Vision Deficiency Friendly Colormaps (`cmweather.cm_colorblind`)
Expand All @@ -9,6 +18,18 @@
:show-inheritance:
```

```{code-cell} ipython3
:tags: [remove-input]
from IPython.display import HTML
from cmweather.cm_colorblind import cmap_d
cm_names = [cnm for cnm in cmap_d.keys() if not cnm.endswith('_r')]
for cm_name in cm_names:
display(HTML(cmap_d[cm_name]._repr_html_()))
```

## More Weather Colormaps (`cmweather.cm`)

```{eval-rst}
Expand All @@ -17,3 +38,16 @@
:undoc-members:
:show-inheritance:
```

```{code-cell} ipython3
:tags: [remove-input]
from IPython.display import HTML
from cmweather.cm import cmap_d
cm_names = [cnm for cnm in cmap_d.keys() if not cnm.endswith('_r')]
cm_names.sort()
for cm_name in cm_names:
display(HTML(cmap_d[cm_name]._repr_html_()))
```

0 comments on commit 0e36c5d

Please sign in to comment.