Skip to content

Commit

Permalink
Taylor plot
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomodeller committed Feb 20, 2024
1 parent 514cc59 commit f303e03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ModelSkill compares model results with observations. The workflow can be split in two phases:

1. [Matching](matching.md) - making sure that observations and model results are in the same space and time
2. Analysis - [plots](plotting.md) and [statistics](skill.md) of the matched data
2. Analysis - [plots](plotting.qmd) and [statistics](skill.md) of the matched data

If the observations and model results are already matched (i.e. are stored in the same data source),
the `from_matched()` function can be used to go directly to the analysis phase.
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/plotting.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ms.plotting.temporal_coverage(obs=[o1, o2], mod=mr);
The spatial coverage of observations and model results can be plotted using the [`spatial_overview`](`modelskill.plotting.spatial_overview`) function in the [`plotting`](`modelskill.plotting`) module:

```{python}
>>> ms.plotting.spatial_overview([o1, o2], mr);
ms.plotting.spatial_overview([o1, o2], mr);
```


Expand All @@ -74,7 +74,7 @@ cmp.plot.scatter();
A Taylor diagram shows how well a model result matches an observation in terms of correlation, standard deviation and root mean squared error. The `taylor` plot can be accessed through the Comparer [`plot`](`modelskill.comparison.ComparerPlotter`) accessor or the ComparerCollection [`plot`](`modelskill.comparison.ComparerCollectionPlotter`) accessor:

```{python}
cmp.plot.taylor()
cmp.plot.taylor();
```


Expand Down
13 changes: 11 additions & 2 deletions modelskill/comparison/_comparer_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,17 @@ def taylor(
Examples
--------
>>> comparer.taylor()
>>> comparer.taylor(start="2017-10-28", figsize=(5,5))
```{python}
#| echo: False
import modelskill as ms
o1 = ms.PointObservation('../data/SW/HKNA_Hm0.dfs0', item=0, x=4.2420, y=52.6887)
mr = ms.DfsuModelResult('../data/SW/HKZN_local_2017_DutchCoast.dfsu', item=0)
cmp = ms.match(obs=o1, mod=mr)
```
```{python}
cmp.plot.taylor()
```
Notes
-----
Expand Down

0 comments on commit f303e03

Please sign in to comment.