Skip to content

Commit

Permalink
rename si_heatmap to heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonk committed Nov 11, 2024
1 parent de782f2 commit 25cea98
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions doc/examples/example05_multiyear_drought.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -54,7 +54,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -82,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -113,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -122,7 +122,7 @@
"(12784.0, 16436.0)"
]
},
"execution_count": 13,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -167,7 +167,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -176,7 +176,7 @@
"(14610.0, 16436.0)"
]
},
"execution_count": 14,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -192,7 +192,7 @@
}
],
"source": [
"ax = si.plot.si_heatmap([spei1, spei3, spei6, spei9, spei12, spei24])\n",
"ax = si.plot.heatmap([spei1, spei3, spei6, spei9, spei12, spei24])\n",
"ax.xaxis.set_major_locator(mpl.dates.YearLocator())\n",
"ax.xaxis.set_minor_locator(mpl.dates.MonthLocator())\n",
"ax.get_figure().axes[-1].set_yticks(range(-3, 0))\n",
Expand All @@ -208,7 +208,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -217,7 +217,7 @@
"(14610.0, 16436.0)"
]
},
"execution_count": 15,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -233,7 +233,7 @@
}
],
"source": [
"ax = si.plot.si_heatmap(\n",
"ax = si.plot.heatmap(\n",
" [spei1, spei3, spei6, spei9, spei12, spei24], cmap=\"vik_r\", vmax=3\n",
")\n",
"ax.xaxis.set_major_locator(mpl.dates.YearLocator())\n",
Expand All @@ -244,7 +244,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "spei-env--196-leg-py3.10",
"language": "python",
"name": "python3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/spei/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def monthly_density(
return ax


def si_heatmap(
def heatmap(
sis: List[Series],
cmap: str = "Reds_r",
vmin: float = -3.0,
Expand Down

0 comments on commit 25cea98

Please sign in to comment.