Skip to content

Commit b58e625

Browse files
committed
Fix references to the new sphinx-gallery generated examples
1 parent 68b428a commit b58e625

File tree

10 files changed

+12
-24
lines changed

10 files changed

+12
-24
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ geometry.write_shapefile(dataset, './gbr4.shp')
4949

5050
## Examples
5151

52+
The `examples/` directory contains examples of making many different plots.
53+
These are included in the documentation under [Examples][emsarray-examples].
54+
5255
Examples of using `emsarray` are available in the [emsarray-notebooks][emsarray-notebooks] repository.
5356
You can [explore these notebooks online][emsarray-binder] with Binder.
5457

@@ -98,6 +101,7 @@ You can the view the docs at <http://localhost:5500>
98101
[emsarray-binder]: https://mybinder.org/v2/gh/csiro-coasts/emsarray-notebooks/HEAD
99102
[emsarray-conda-forge]: https://anaconda.org/conda-forge/emsarray/
100103
[emsarray-documentation]: https://emsarray.readthedocs.io
104+
[emsarray-examples]: https://emsarray.readthedocs.io/en/stable/examples/
101105
[emsarray-notebooks]: https://github.com/csiro-coasts/emsarray-notebooks
102106
[emsarray-pypi]: https://pypi.org/project/emsarray/
103107
[emsarray-source-code]: https://github.com/csiro-coasts/emsarray

docs/api/plot.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ The :func:`plot_on_figure` and :func:`animate_on_figure` functions
1111
will generate a simple plot of any supported variables.
1212
These functions are intended as quick and simple ways of exploring a dataset
1313
and have limited customisation options.
14-
Consult the :ref:`examples gallery <examples>`
15-
for demonstrations on making more customised plots.
1614

17-
The :ref:`examples <examples>` section contains many worked examples on how to generate plots.
18-
:ref:`example-plot-with-clim` is a good place to start.
15+
The :ref:`examples <examples>` section contains many worked examples
16+
on how to generate plots with more customisations.
17+
:ref:`sphx_glr_examples_plot-with-clim.py` is a good place to start.
1918

2019
Shortcuts
2120
=========

docs/api/transect.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ Transects are vertical slices along some path through your dataset.
1212
Examples
1313
--------
1414

15-
.. list-table::
16-
17-
* - :ref:`example-kgari-transect`
18-
19-
.. image:: /_static/images/kgari-transect.png
20-
:width: 200
21-
:class: no-scaled-link
15+
.. minigallery:: ../examples/plot-kgari-transect.py
2216

2317
.. autofunction:: plot
2418

docs/releases/0.10.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Released on 2025-09-08
88
where some variables are lacking a `standard_name` (:issue:`178`, :pr:`180`).
99
* Updated the tests to be compatible with the latest xarray versions (:pr:`182`).
1010
* Added an example to the documentation showing
11-
:ref:`how to set the clim parameter in plots <example-plot-with-clim>`
11+
:ref:`how to set the clim parameter in plots <sphx_glr_examples_plot-with-clim.py>`
1212
(:pr:`179`).
1313
* Bumped pinned dependencies (:pr:`183`).
1414
* Fixed :func:`emsarray.utils.datetime_from_np_time`

examples/plot-animation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _example-animated-plot:
3-
42
=============
53
Animated plot
64
=============

examples/plot-kgari-transect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _example-kgari-transect:
3-
42
====================
53
K'gari transect plot
64
====================

examples/plot-set-extent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _example-plot-set-extent:
3-
42
================================
53
Plot a small area with landmarks
64
================================

examples/plot-with-clim.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""
2-
.. _example-plot-with-clim:
3-
42
===============================
53
Plot with specified data limits
64
===============================

src/emsarray/conventions/_base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,8 @@ def animate_on_figure(
11341134
11351135
This method is a shortcut for quickly generating simple animations.
11361136
It is not intended to be fully featured.
1137-
See the :ref:`examples <examples>` for more comprehensive plotting examples.
1138-
1139-
For real world examples, refer to the ``examples/animation.ipynb`` notebook.
1137+
See the :ref:`examples <examples>` for more comprehensive plotting examples,
1138+
and specifically :ref:`sphx_glr_examples_plot-animation.py` for an animated example.
11401139
11411140
Parameters
11421141
----------

src/emsarray/plot/shortcuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def add_landmarks(
9696
9797
Examples
9898
--------
99-
:ref:`example-plot-set-extent`
99+
.. minigallery:: ../examples/plot-set-extent.py
100100
"""
101101
outline = patheffects.withStroke(
102102
linewidth=outline_width, foreground=outline_color)

0 commit comments

Comments
 (0)