Skip to content

Commit 88d8833

Browse files
Update HTTP links to cf-plot documentation to new home in recipes
Used command and then manually checked URL for a few cases: find . -type f | xargs sed -i 's~http://ajheaps.github.io/cf-plot/~ https://ncas-cms.github.io/cf-plot/build/~g'
1 parent 2a2fe75 commit 88d8833

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

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: 4 additions & 4 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,12 +68,12 @@
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

docs/source/recipes/plot_13_recipe.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
# %%
3939
# 5. Plot the various Niño regions using cf-plot. Here:
4040
#
41-
# - `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to
41+
# - `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to
4242
# define the parts of the plot area, which is closed by
43-
# `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
43+
# `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
4444
# - `cfplot.mapset <https://ajheaps.github.io/cf-plot/mapset.html>`_ is used to
4545
# set the map limits and projection;
46-
# - `cfplot.setvars <http://ajheaps.github.io/cf-plot/setvars.html>`_ is used to
46+
# - `cfplot.setvars <https://ncas-cms.github.io/cf-plot/build/setvars.html>`_ is used to
4747
# set various attributes of the plot, like setting the land colour to grey;
48-
# - `cfplot.cscale <http://ajheaps.github.io/cf-plot/cscale.html>`_ is used to
48+
# - `cfplot.cscale <https://ncas-cms.github.io/cf-plot/build/cscale.html>`_ is used to
4949
# choose one of the colour maps amongst many available;
50-
# - `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_ plots contour data
50+
# - `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_ plots contour data
5151
# from the ``region`` subspace at a specific time with no contour lines and a
5252
# title;
5353
# - next, four Niño regions and labels are defined using
@@ -206,13 +206,13 @@
206206
# El Niño and La Niña events. Now plot SST anomalies in the Niño 3.4 region over
207207
# time using cf-plot. Here:
208208
#
209-
# - `cfplot.gset <http://ajheaps.github.io/cf-plot/gset.html>`_ sets the limits
209+
# - `cfplot.gset <https://ncas-cms.github.io/cf-plot/build/gset.html>`_ sets the limits
210210
# of the x-axis (years from 1940 to 2022) and y-axis (anomalies from -3
211211
# degrees C to 3 degrees C) for the plot;
212-
# - `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to
212+
# - `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to
213213
# define the parts of the plot area, which is closed by
214-
# `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
215-
# - `cfplot.lineplot <http://ajheaps.github.io/cf-plot/lineplot.html>`_ plots
214+
# `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
215+
# - `cfplot.lineplot <https://ncas-cms.github.io/cf-plot/build/lineplot.html>`_ plots
216216
# the rolling Niño 3.4 index over time;
217217
# - a zero line and also horizontal dashed lines are drawn for El Niño and
218218
# La Niña thresholds using

docs/source/recipes/plot_14_recipe.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@
3333
# %%
3434
# 5. Plot contour lines of this geopotential height for July 2018. Here:
3535
#
36-
# - `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to
36+
# - `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to
3737
# define the parts of the plot area, which is closed by
38-
# `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
38+
# `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
3939
# - `cfplot.mapset <https://ajheaps.github.io/cf-plot/mapset.html>`_ is used to
4040
# set the map projection to North Polar Stereographic;
41-
# - `cfplot.setvars <http://ajheaps.github.io/cf-plot/setvars.html>`_ is used to
41+
# - `cfplot.setvars <https://ncas-cms.github.io/cf-plot/build/setvars.html>`_ is used to
4242
# set various attributes of the plot, like setting the thickness of the lines
4343
# that represent continents;
44-
# - `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_ plots the contour
44+
# - `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_ plots the contour
4545
# lines representing the 200 hpa geopotential height values without filling
4646
# between the contour lines (``fill=False``) and no colour bar
4747
# (``colorbar=False``);
4848
# - `cfplot.levs <https://ajheaps.github.io/cf-plot/levs.html>`_ is used to
4949
# specify two contour levels, 12000 and 12300 m, corresponding to the
5050
# approximate polar-front jet and subtropical jet respectively;
51-
# - `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_ is again used to
51+
# - `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_ is again used to
5252
# plot the contour lines for polar-front jet and subtropical jet with a
5353
# thicker line width;
5454
# - `cfp.plotvars.mymap.stock_img() <https://scitools.org.uk/cartopy/docs/v0.15/matplotlib/geoaxes.html#cartopy.mpl.geoaxes.GeoAxes.stock_img>`_
@@ -119,20 +119,20 @@
119119
# provide an insight into the atmospheric conditions, the temperature anomalies
120120
# and the geopotential height contours are plotted using cf-plot. Here:
121121
#
122-
# - `cfplot.gopen <http://ajheaps.github.io/cf-plot/gopen.html>`_ is used to
122+
# - `cfplot.gopen <https://ncas-cms.github.io/cf-plot/build/gopen.html>`_ is used to
123123
# define the parts of the plot area, which is closed by
124-
# `cfplot.gclose <http://ajheaps.github.io/cf-plot/gclose.html>`_;
124+
# `cfplot.gclose <https://ncas-cms.github.io/cf-plot/build/gclose.html>`_;
125125
# - `cfplot.mapset <https://ajheaps.github.io/cf-plot/mapset.html>`_ is used to
126126
# set the map projection to Robinson;
127-
# - `cfplot.setvars <http://ajheaps.github.io/cf-plot/setvars.html>`_ is used to
127+
# - `cfplot.setvars <https://ncas-cms.github.io/cf-plot/build/setvars.html>`_ is used to
128128
# set various attributes of the plot, like setting the thickness of the lines
129129
# that represent continents and master title properties;
130130
# - `cfplot.levs <https://ajheaps.github.io/cf-plot/levs.html>`_ is used to
131131
# specify the contour levels for temperature anomalies, starting from -2 to 2
132132
# with an interval of 0.5;
133-
# - `cfplot.cscale <http://ajheaps.github.io/cf-plot/cscale.html>`_ is used to
133+
# - `cfplot.cscale <https://ncas-cms.github.io/cf-plot/build/cscale.html>`_ is used to
134134
# choose one of the colour maps amongst many available;
135-
# - `cfplot.con <http://ajheaps.github.io/cf-plot/con.html>`_ plots contour fill
135+
# - `cfplot.con <https://ncas-cms.github.io/cf-plot/build/con.html>`_ plots contour fill
136136
# of temperature anomalies without contour lines (``lines=False``);
137137
# - `cfplot.levs() <https://ajheaps.github.io/cf-plot/levs.html>`_ is used to
138138
# reset contour levels to default after which the steps to plot the contour

0 commit comments

Comments
 (0)