Skip to content

Commit c19b991

Browse files
Merge pull request #813 from sadielbartholomew/cf-plot-update-refs-links
Update links to point to new home of cf-plot documentation
2 parents 6e9a310 + 8cfc8d4 commit c19b991

14 files changed

+59
-57
lines changed

cf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
7373
Powerful, flexible, and very simple to produce visualisations of field
7474
constructs uses the `cfplot` package
75-
(http://ajheaps.github.io/cf-plot), that is automatically installed
75+
(https://ncas-cms.github.io/cf-plot/build/), that is automatically installed
7676
along with with `cf`.
7777
7878
See the :ref:`cf-python home page <cf-python-home>` for documentation,

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def _get_date():
153153
"cftime": ("https://unidata.github.io/cftime", None),
154154
"cfunits": ("https://ncas-cms.github.io/cfunits", None),
155155
"cfdm": ("https://ncas-cms.github.io/cfdm", None),
156-
"cfplot": ("https://ajheaps.github.io/cf-plot", None),
156+
"cfplot": ("https://ncas-cms.github.io/cf-plot/build/", None),
157157
"dask": ("https://docs.dask.org/en/latest", None),
158158
"matplotlib": ("https://matplotlib.org/stable/", None),
159159
# REVIEW: h5: new intersphinx mapping

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ details.
102102

103103
To install cf with all of its :ref:`required <Required>` and
104104
:ref:`optional <Optional>` dependencies, and the `cf-plot
105-
visualisation package <http://ajheaps.github.io/cf-plot>`_, run:
105+
visualisation package <https://ncas-cms.github.io/cf-plot/build/>`_, run:
106106

107107
.. code-block:: console
108108
:caption: *Install with conda.*

docs/source/introduction.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ manipulation and can:
127127

128128
Powerful, flexible, and user-friendly visualisations of field
129129
constructs are available with the `cf-plot` package that is installed
130-
separately to `cf` (see http://ajheaps.github.io/cf-plot for details).
130+
separately to `cf` (see the
131+
`cf-plot documentation
132+
<https://ncas-cms.github.io/cf-plot/build/>`_ for details).
131133

132134
See the `cf-plot gallery
133-
<http://ajheaps.github.io/cf-plot/gallery.html>`_ for the wide range
135+
<https://ncas-cms.github.io/cf-plot/build/gallery.html>`_ for the wide range
134136
of plotting possibilities with example code.
135137

136138
.. figure:: images/cfplot_example.png

docs/source/recipes/plot_05_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
print(pre)
4545

4646
# %%
47-
# 4. Plot the wind vectors on top of precipitation data for June 1995 by creating a subspace with a date-time object and using `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_. Here `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to define the parts of the plot area, which is closed by `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_; `cfplot.cscale <http://ajheaps.github.io/cf-plot/cscale.html>`_ is used to choose one of the colour maps amongst many available; `cfplot.levs <http://ajheaps.github.io/cf-plot/levs.html>`_ is used to set the contour levels for precipitation data; and `cfplot.vect <http://ajheaps.github.io/cf-plot/vect.html>`_ is used to plot the wind vectors for June 1995:
47+
# 4. Plot the wind vectors on top of precipitation data for June 1995 by creating a subspace with a date-time object and using `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_. Here `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to define the parts of the plot area, which is closed by `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_; `cfplot.cscale <https://ncas-cms.github.io/cf-plot/build/cscale.html>`_ is used to choose one of the colour maps amongst many available; `cfplot.levs <https://ncas-cms.github.io/cf-plot/build/levs.html>`_ is used to set the contour levels for precipitation data; and `cfplot.vect <https://ncas-cms.github.io/cf-plot/build/vect.html>`_ is used to plot the wind vectors for June 1995:
4848
june_95 = cf.year(1995) & cf.month(6)
4949
cfp.gopen()
5050
cfp.cscale("precip4_11lev")

docs/source/recipes/plot_06_recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
print(test)
3636

3737
# %%
38-
# 6. Plot the wind gust by creating a subspace for the specified variable ``test`` using `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_. Here `cfplot.mapset <http://ajheaps.github.io/cf-plot/mapset.html>`_ is used to set the mapping parameters like setting the map resolution to 50m:
38+
# 6. Plot the wind gust by creating a subspace for the specified variable ``test`` using `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_. Here `cfplot.mapset <https://ncas-cms.github.io/cf-plot/build/mapset.html>`_ is used to set the mapping parameters like setting the map resolution to 50m:
3939
cfp.mapset(resolution="50m")
4040
cfp.con(gust.subspace(T=test), lines=False)
4141

4242
# %%
43-
# 7. To see the rotated pole data on the native grid, the above steps are repeated and projection is set to rotated in `cfplot.mapset <http://ajheaps.github.io/cf-plot/mapset.html>`_:
43+
# 7. To see the rotated pole data on the native grid, the above steps are repeated and projection is set to rotated in `cfplot.mapset <https://ncas-cms.github.io/cf-plot/build/mapset.html>`_:
4444
cfp.mapset(resolution="50m", proj="rotated")
4545
cfp.con(gust.subspace(T=test), lines=False)
4646

docs/source/recipes/plot_07_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
print(ensemble.constructs)
3939

4040
# %%
41-
# 6. Loop over the realizations in the ensemble using the *range* function and the *domain_axis* to determine the size of the realization dimension. For each realization, extract a subspace of the ensemble using the *subspace* method and the ``'id%realization'`` keyword argument along a specific latitude and longitude and plot the realizations from the 4D field using `cfplot.lineplot <http://ajheaps.github.io/cf-plot/lineplot.html>`_.
41+
# 6. Loop over the realizations in the ensemble using the *range* function and the *domain_axis* to determine the size of the realization dimension. For each realization, extract a subspace of the ensemble using the *subspace* method and the ``'id%realization'`` keyword argument along a specific latitude and longitude and plot the realizations from the 4D field using `cfplot.lineplot <https://ncas-cms.github.io/cf-plot/build/lineplot.html>`_.
4242
# A moving average of the ensemble along the time axis, with a window size of 90 (i.e. an approximately 3-month moving average) is calculated using the *moving_window* method. The ``mode='nearest'`` parameter is used to specify how to pad the data outside of the time range. The *squeeze* method removes any dimensions of size 1 from the field to produce a 2D field:
4343

4444
cfp.gopen()

docs/source/recipes/plot_08_recipe.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ def process_subsets(subset_mask):
8787
)
8888

8989
# %%
90-
# 7. Create two plots - one for the 1850-2020 time period and another for the 1980-2020 time period using `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_.
90+
# 7. Create two plots - one for the 1850-2020 time period and another for the 1980-2020 time period using `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_.
9191
# The results are multiplied by 10 so that each plot displays the temperature trend in K/decade with stippling to indicate areas where the trend is statistically significant (p-value < 0.05).
92-
# Here `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to define the parts of the plot area with two rows and one column, and setting the bottom margin to 0.2.
93-
# It is closed by `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
94-
# `cfplot.gpos <http://ajheaps.github.io/cf-plot/gpos.html>`_ is used to set the plotting position of both the plots;
95-
# `cfplot.mapset <http://ajheaps.github.io/cf-plot/mapset.html>`_ is used to set the map projection to Robinson;
96-
# `cfplot.cscale <http://ajheaps.github.io/cf-plot/cscale.html>`_ is used to choose one of the colour maps amongst many available;
97-
# `cfplot.levs <http://ajheaps.github.io/cf-plot/levs.html>`_ is used to set the contour levels;
98-
# and `cfplot.stipple <http://ajheaps.github.io/cf-plot/stipple.html>`_ is used to add stippling to show statistically significant areas:
92+
# Here `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to define the parts of the plot area with two rows and one column, and setting the bottom margin to 0.2.
93+
# It is closed by `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
94+
# `cfplot.gpos <https://ncas-cms.github.io/cf-plot/build/gpos.html>`_ is used to set the plotting position of both the plots;
95+
# `cfplot.mapset <https://ncas-cms.github.io/cf-plot/build/mapset.html>`_ is used to set the map projection to Robinson;
96+
# `cfplot.cscale <https://ncas-cms.github.io/cf-plot/build/cscale.html>`_ is used to choose one of the colour maps amongst many available;
97+
# `cfplot.levs <https://ncas-cms.github.io/cf-plot/build/levs.html>`_ is used to set the contour levels;
98+
# and `cfplot.stipple <https://ncas-cms.github.io/cf-plot/build/stipple.html>`_ is used to add stippling to show statistically significant areas:
9999

100100
cfp.gopen(rows=2, columns=1, bottom=0.2)
101101

docs/source/recipes/plot_10_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# %%
4141
# 5. The relative vorticity is calculated using `cf.curl_xy
4242
# <https://ncas-cms.github.io/cf-python/function/cf.curl_xy.html>`_ and
43-
# plotted using `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_.
43+
# plotted using `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_.
4444
# The ``with cf.relaxed_identities(True)`` context manager statement prevents
4545
# the curl opereration broadcasting across the two ``expver`` dimensions because
4646
# it can't be certain that they are the same as they lack the standardised

docs/source/recipes/plot_12_recipe.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# %%
4545
# 6. Plot the AOD for all the retrievals using
46-
# `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_. Here the argument
46+
# `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_. Here the argument
4747
# ``'ptype'`` specifies the type of plot to use (latituide-longitude here) and
4848
# the argument ``'lines=False'`` does not draw contour lines:
4949
cfp.con(f=aod.array, x=lon.array, y=lat.array, ptype=1, lines=False)
@@ -68,17 +68,17 @@
6868

6969
# %%
7070
# 9. Now plot both the AOD from `high-quality` retrieval and all other retrievals
71-
# using `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_. Here:
71+
# using `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_. Here:
7272
#
73-
# - `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to
73+
# - `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to
7474
# define the parts of the plot area, specifying that the figure should have
7575
# 1 row and 2 columns, which is closed by
76-
# `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
76+
# `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
7777
# - `plt.suptitle <https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.suptitle.html>`_
7878
# is used to add a title for the whole figure;
7979
# - the subplots for plotting are selected using
80-
# `cfplot.gpos <https://ajheaps.github.io/cf-plot/gpos.html>`_ after which
81-
# `cfplot.mapset <https://ajheaps.github.io/cf-plot/mapset.html>`_ is used to
80+
# `cfplot.gpos <https://ncas-cms.github.io/cf-plot/build/gpos.html>`_ after which
81+
# `cfplot.mapset <https://ncas-cms.github.io/cf-plot/build/mapset.html>`_ is used to
8282
# set the map limits and resolution for the subplots;
8383
# - and as cf-plot stores the plot in a plot object with the name
8484
# ``cfp.plotvars.plot``, country borders are added using normal

0 commit comments

Comments
 (0)