From c374dc5fa85019c0b3e23592b309c71d6257771b Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Tue, 30 Jul 2024 18:00:33 +0100 Subject: [PATCH 1/3] Docs infra.: apply PyData Theme esp. for light/dark mode --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 25e941b..80efd10 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -100,7 +100,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "default" +html_theme = "pydata_sphinx_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 4516eb43bf53b3808a03459e72f00bfe0d24bdc9 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Tue, 30 Jul 2024 18:15:31 +0100 Subject: [PATCH 2/3] Docs infra.: configure new theme incl. announcement of new home --- docs/source/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 80efd10..3eb603e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -146,13 +146,13 @@ html_sidebars = {"**": ["sidebar.html"]} html_theme_options = { - "stickysidebar": "true", "sidebarwidth": 150, - # "externalrefs" : "false", - # "relbarbgcolor" : "#5c85d6", - # "headbgcolor" : "#5c85d6", #"#85a3e0", ##333399", - # "sidebarbgcolor": "#85a3e0", - # "headtextcolor" : "#ffffff", #"#333399", + "show_version_warning_banner": True, + "announcement": ( + "This is the new permanent home of the cf-plot documentation: please " + "consult this and not the old frozen version under " + "'http://ajheaps.github.io'." + ) } From 418a3d3fb79ac85e14f501c3f8c3569a3bc51fa7 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Tue, 30 Jul 2024 18:16:14 +0100 Subject: [PATCH 3/3] Rebuild full docs using newly-configured PyData theme --- docs/build/.buildinfo | 2 +- docs/build/_sources/advanced.rst.txt | 37 +- docs/build/_sources/colour_scales.rst.txt | 44 +- docs/build/_sources/cylindrical.rst.txt | 18 +- docs/build/_sources/download.rst.txt | 10 +- docs/build/_sources/gallery.rst.txt | 38 +- docs/build/_sources/graphs.rst.txt | 26 +- docs/build/_sources/hovmuller.rst.txt | 27 +- docs/build/_sources/internal_routines.rst.txt | 8 +- docs/build/_sources/issues.rst.txt | 35 +- docs/build/_sources/license.rst.txt | 18 +- docs/build/_sources/multiple_plots.rst.txt | 14 +- .../_sources/older_documentation.rst.txt | 39 +- docs/build/_sources/polar.rst.txt | 12 +- docs/build/_sources/pressure.rst.txt | 25 +- docs/build/_sources/projections.rst.txt | 49 +- docs/build/_sources/rotated_pole.rst.txt | 28 +- docs/build/_sources/routines.rst.txt | 18 +- docs/build/_sources/stipple_plots.rst.txt | 11 +- docs/build/_sources/training.rst.txt | 6 +- docs/build/_sources/trajectories.rst.txt | 29 +- docs/build/_sources/unstructured.rst.txt | 42 +- docs/build/_sources/user_defined.rst.txt | 14 +- docs/build/_sources/user_guide.rst.txt | 269 +++--- docs/build/_sources/vectors.rst.txt | 27 +- docs/build/_sources/version_1.3.rst.txt | 32 +- docs/build/_sources/version_1.5.rst.txt | 15 +- docs/build/_sources/version_1.6.rst.txt | 3 +- docs/build/_sources/version_1.7.rst.txt | 29 +- docs/build/_sources/version_1.9.rst.txt | 28 +- docs/build/_sources/version_2.1.rst.txt | 94 +-- docs/build/_sources/version_2.2.rst.txt | 23 +- docs/build/_sources/version_2.3.rst.txt | 17 +- docs/build/_sources/version_2.4.rst.txt | 19 +- docs/build/_sources/version_3.0.rst.txt | 59 +- docs/build/_sources/version_3.1.rst.txt | 114 ++- docs/build/_sources/version_3.2.rst.txt | 75 +- docs/build/_sources/version_3.3.rst.txt | 6 +- docs/build/_sources/versions.rst.txt | 20 +- docs/build/_sources/wrf.rst.txt | 11 +- docs/build/_static/basic.css | 2 +- docs/build/_static/classic.css | 286 ------- docs/build/_static/default.css | 1 - docs/build/_static/doctools.js | 2 +- docs/build/_static/graphviz.css | 2 +- docs/build/_static/language_data.js | 4 +- docs/build/_static/pygments.css | 227 +++-- docs/build/_static/searchtools.js | 170 ++-- docs/build/_static/sidebar.js | 70 -- docs/build/add_cyclic.html | 450 ++++++++-- docs/build/advanced.html | 499 +++++++++-- docs/build/axes.html | 457 ++++++++-- docs/build/axes_plot.html | 457 ++++++++-- docs/build/bfill.html | 444 ++++++++-- docs/build/calculate_levels.html | 436 ++++++++-- docs/build/cbar.html | 467 ++++++++-- docs/build/cf_data_assign.html | 445 ++++++++-- docs/build/cf_var_name.html | 479 +++++++++-- docs/build/check_data.html | 430 ++++++++-- docs/build/colour_scales.html | 523 ++++++++++-- docs/build/compare_arrays.html | 426 ++++++++-- docs/build/compare_images.html | 426 ++++++++-- docs/build/con.html | 529 ++++++++++-- docs/build/cscale.html | 467 ++++++++-- docs/build/cscale_get_map.html | 437 ++++++++-- docs/build/cylindrical.html | 472 +++++++++-- docs/build/download.html | 474 +++++++++-- docs/build/find_pos_in_array.html | 464 ++++++++-- docs/build/fix_floats.html | 439 ++++++++-- docs/build/gallery.html | 492 +++++++++-- docs/build/gclose.html | 468 ++++++++-- docs/build/genindex.html | 436 +++++++--- docs/build/gopen.html | 474 +++++++++-- docs/build/gpos.html | 466 ++++++++-- docs/build/graphs.html | 478 +++++++++-- docs/build/gset.html | 463 ++++++++-- docs/build/gvals.html | 433 ++++++++-- docs/build/hovmuller.html | 472 +++++++++-- docs/build/index.html | 449 ++++++++-- docs/build/internal_routines.html | 514 ++++++++--- docs/build/issues.html | 443 ++++++++-- docs/build/levs.html | 465 ++++++++-- docs/build/license.html | 441 ++++++++-- docs/build/lineplot.html | 477 +++++++++-- docs/build/map_title.html | 427 ++++++++-- docs/build/mapaxis.html | 440 ++++++++-- docs/build/mapset.html | 462 ++++++++-- docs/build/max_ndecs_data.html | 436 ++++++++-- docs/build/multiple_plots.html | 472 +++++++++-- docs/build/ndecs.html | 466 ++++++++-- docs/build/objects.inv | Bin 2209 -> 2141 bytes docs/build/older_documentation.html | 443 ++++++++-- docs/build/pcon.html | 459 ++++++++-- docs/build/plot_map_axes.html | 435 ++++++++-- docs/build/polar.html | 466 ++++++++-- docs/build/polar_regular_grid.html | 470 +++++++++-- docs/build/pressure.html | 478 +++++++++-- docs/build/process_color_scales.html | 440 ++++++++-- docs/build/projections.html | 502 +++++++++-- docs/build/regression_tests.html | 427 ++++++++-- docs/build/regrid.html | 459 ++++++++-- docs/build/reset.html | 462 ++++++++-- docs/build/rgaxes.html | 465 ++++++++-- docs/build/rotated_pole.html | 472 +++++++++-- docs/build/routines.html | 443 ++++++++-- docs/build/search.html | 412 +++++++-- docs/build/searchindex.js | 2 +- docs/build/set_map.html | 437 ++++++++-- docs/build/setvars.html | 473 +++++++++-- docs/build/stipple.html | 459 ++++++++-- docs/build/stipple_plots.html | 466 ++++++++-- docs/build/stipple_points.html | 460 ++++++++-- docs/build/stream.html | 468 ++++++++-- docs/build/supscr.html | 436 ++++++++-- docs/build/training.html | 445 ++++++++-- docs/build/traj.html | 489 +++++++++-- docs/build/trajectories.html | 491 +++++++++-- docs/build/unstructured.html | 486 +++++++++-- docs/build/user_defined.html | 463 ++++++++-- docs/build/user_guide.html | 797 ++++++++++++++---- docs/build/vect.html | 459 ++++++++-- docs/build/vectors.html | 490 +++++++++-- docs/build/version3_changes.html | 466 ++++++++-- docs/build/version_1.3.html | 505 +++++++++-- docs/build/version_1.5.html | 496 +++++++++-- docs/build/version_1.6.html | 445 ++++++++-- docs/build/version_1.7.html | 517 ++++++++++-- docs/build/version_1.8.html | 463 ++++++++-- docs/build/version_1.9.html | 556 ++++++++++-- docs/build/version_2.0.html | 463 ++++++++-- docs/build/version_2.1.html | 690 ++++++++++++--- docs/build/version_2.2.html | 511 +++++++++-- docs/build/version_2.3.html | 472 +++++++++-- docs/build/version_2.4.html | 484 +++++++++-- docs/build/version_3.0.html | 574 ++++++++++--- docs/build/version_3.1.html | 546 ++++++++++-- docs/build/version_3.2.html | 526 ++++++++++-- docs/build/version_3.3.html | 448 ++++++++-- docs/build/versions.html | 448 ++++++++-- docs/build/vloc.html | 468 ++++++++-- docs/build/wrf.html | 460 ++++++++-- 141 files changed, 37106 insertions(+), 7636 deletions(-) delete mode 100644 docs/build/_static/classic.css delete mode 100644 docs/build/_static/default.css delete mode 100644 docs/build/_static/sidebar.js diff --git a/docs/build/.buildinfo b/docs/build/.buildinfo index 9e41557..6e656c7 100644 --- a/docs/build/.buildinfo +++ b/docs/build/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b20cddc9ac81d3adb3cbbbe7bfbc4417 +config: b2bd04cad44aa68354896a81dc9679e8 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/_sources/advanced.rst.txt b/docs/build/_sources/advanced.rst.txt index 15e6651..098453e 100644 --- a/docs/build/_sources/advanced.rst.txt +++ b/docs/build/_sources/advanced.rst.txt @@ -26,7 +26,7 @@ To see all the methods for the plot object type In this example we make a blank map plot, change the longitude labels and add a box and some text. For map plots we operate on the cfp.plotvars.mymap object and need to specify transform=ccrs.PlateCarree() to make sure that the plotting is made in regular longitude and latitude coordinates. If the plot is not a map plot then the transform=ccrs.PlateCarree() isn't needed. .. image:: images/advanced1.png - :scale: 52% + :scale: 52% :: @@ -45,7 +45,7 @@ In this example we make a blank map plot, change the longitude labels and add a yticks=[-30.0, 70.0] yticklabels=['ylabel1', 'ylabel2'] - # Specify some contour levels outside the range of the data + # Specify some contour levels outside the range of the data # and make a blank contour plot cfp.levs(-1000, -900, 100) cfp.con(f.subspace(time=15), fill=False, colorbar=None, @@ -54,7 +54,7 @@ In this example we make a blank map plot, change the longitude labels and add a # A box cfp.plotvars.mymap.plot([-150, -150, -90, -90, -150], - [-5, 5, 5, -5, -5], linewidth=3.0, + [-5, 5, 5, -5, -5], linewidth=3.0, color='blue', transform=ccrs.PlateCarree()) # A symbol @@ -78,7 +78,7 @@ In this example we make a blank map plot, change the longitude labels and add a Adding country borders etc can be done using the normal Cartopy operations on the cfp.plotvars.mymap object. Look on the Cartopy web page for examples of these. - + Plotting shape files -------------------- @@ -87,7 +87,7 @@ In this example we make a blank map plot and plot the UK rivers from a shapefile .. image:: images/advanced_shapefile.png - :scale: 52% + :scale: 52% @@ -116,7 +116,7 @@ In this example we make a blank map plot and plot the UK rivers from a shapefile for ip in range(len(points)): lons[ip] = points[ip][0] lats[ip] = points[ip][1] - + cfp.plotvars.mymap.plot(lons, lats , linewidth=1.0, color='blue', transform=ccrs.PlateCarree()) @@ -130,12 +130,12 @@ In this example we make a blank map plot and plot the UK rivers from a shapefile Making a transect plot ---------------------- -In this example we make a contour plot and plot a transect. We use the cfp.regrid bilinear interpolation -routine to interpolate the data. Interpolation points for this routine must be **within** the data limits +In this example we make a contour plot and plot a transect. We use the cfp.regrid bilinear interpolation +routine to interpolate the data. Interpolation points for this routine must be **within** the data limits of the original data. Care is needed to ensure that the field coordinates go from a low value to a high value. This is usually not an issue with longitude but occasionally with latitude (as in this case) the coordinate goes from the north pole to the south pole. A simple flip of the latitude and data is need here. .. image:: images/advanced_transect.png - :scale: 52% + :scale: 52% :: @@ -220,7 +220,7 @@ For example, to make one of the colours in the viridis colour scale grey use: .. image:: images/advanced2.png - :scale: 52% + :scale: 52% Colouring land and lakes @@ -238,7 +238,7 @@ This is done by changing the land_color, ocean_color and lake_color variables in .. image:: images/advanced3.png - :scale: 52% + :scale: 52% @@ -269,7 +269,7 @@ Masked data isn't plotted. .. image:: images/advanced4.png - :scale: 52% + :scale: 52% Masked data is plotted as blockfill in grey. @@ -285,17 +285,17 @@ Masked data is plotted as blockfill in grey. cfp.con(h, blockfill=True, title='Masked data plotted in grey') - # Call internal block filling routine + # Call internal block filling routine cfp.bfill(f=np.squeeze(i.array), x=i.coord('X').array, y=i.coord('Y').array, clevs=[990, 1000], lonlat=True, single_fill_color='#d3d3d3') - + cfp.gclose() .. image:: images/advanced5.png - :scale: 52% + :scale: 52% Blockfill with individual colours --------------------------------- @@ -303,7 +303,7 @@ Blockfill with individual colours | If a plot needs to be built up as a series of blockfill plots then this is | possible using the cf-plot internal blockfill routine. A colour contour plot is | made and overlaid with two blockfill regions: -| +| | -50 to 0 = green | 20 to 40 = red @@ -336,7 +336,4 @@ A final call to **cfp.con** is made to overlay contour lines. .. image:: images/advanced6.png - :scale: 52% - - - + :scale: 52% diff --git a/docs/build/_sources/colour_scales.rst.txt b/docs/build/_sources/colour_scales.rst.txt index 2db3a29..d11eca1 100644 --- a/docs/build/_sources/colour_scales.rst.txt +++ b/docs/build/_sources/colour_scales.rst.txt @@ -7,17 +7,17 @@ Colour scales There are two default colour scales in cf-plot: -1) A continuous scale ('viridis') that goes from blue to green and then yellow and suits data that has no zero in it. For example air temperature in Kelvin or geopotential height - see example 1 in the plot gallery. +1) A continuous scale ('viridis') that goes from blue to green and then yellow and suits data that has no zero in it. For example air temperature in Kelvin or geopotential height - see example 1 in the plot gallery. 2) A diverging scale ('scale1') that goes from blue to red and suits data with a zero in it. For example temperature in Celsius or zonal wind - see example 4 in the plot gallery. The colour scale is automatically adjusted so that blue hues are below zero and red hues above zero. -When no calls have been made to **cfp.cscale** cf-plot selects one of theses scales based on whether there is a zero in the data passed for contouring. If a call is made to **cfp.cscale** with just a colour scale name **cfp.cscale('radar')**, for example, then this colour scale is used for all subsequent plots. The colour scale is adjusted automatically to fit the number of contour levels in the plot. +When no calls have been made to **cfp.cscale** cf-plot selects one of theses scales based on whether there is a zero in the data passed for contouring. If a call is made to **cfp.cscale** with just a colour scale name **cfp.cscale('radar')**, for example, then this colour scale is used for all subsequent plots. The colour scale is adjusted automatically to fit the number of contour levels in the plot. If a call to **cfp.cscale** specifies additional parameters to the colour scale, then the automatic colour adjustment is turned off giving the user fine tuning of colours as below. -.. image:: images/cs1.png - :scale: 65% +.. image:: images/cs1.png + :scale: 65% :: @@ -30,11 +30,11 @@ If a call to **cfp.cscale** specifies additional parameters to the colour scale, -To change the number of colours in a scale use the ncols parameters. +To change the number of colours in a scale use the ncols parameters. -.. image:: images/cs2.png - :scale: 65% +.. image:: images/cs2.png + :scale: 65% :: @@ -44,11 +44,11 @@ To change the number of colours in a scale use the ncols parameters. | | -To change the number of colours above and below the mid-point of the scale use the above and below parameters. This is useful for fields where you have differing extents of data above and below the zero line. +To change the number of colours above and below the mid-point of the scale use the above and below parameters. This is useful for fields where you have differing extents of data above and below the zero line. -.. image:: images/cs3.png - :scale: 65% +.. image:: images/cs3.png + :scale: 65% :: @@ -61,8 +61,8 @@ To change the number of colours above and below the mid-point of the scale use t For data where you need white to indicate that this data region is insignificant use the white=white parameter. This can take single or multiple values of the index of the colour scale where white is required in the colour scale. -.. image:: images/cs4.png - :scale: 65% +.. image:: images/cs4.png + :scale: 65% :: @@ -70,7 +70,7 @@ For data where you need white to indicate that this data region is insignificant cfp.levs(manual=[-10,-8, -6, -4, -2, 2, 4, 6, 8, 10]) .. image:: images/cs4.png - :scale: 52% + :scale: 52% To reverse a colour scale use the **reverse=1** option to **cscale** and specify the number of colours required. @@ -81,11 +81,11 @@ To reverse a colour scale use the **reverse=1** option to **cscale** and specify -As a short example to show the flexibilty of the colour scale routines we will make a orography plot using the wiki_2_0.rgb orography/bathymetry colour scale. This has as many colours for bathymetry as for the oroggraphy but in this case we just need a blue ocean as we are really only interested in the orography. So in this case we will define a set of levels using *levs* and then match the colour scale to them. The wiki_2_0.rgb colour scale has as many colours for the ocean as for the land so we can use the above and below options +As a short example to show the flexibilty of the colour scale routines we will make a orography plot using the wiki_2_0.rgb orography/bathymetry colour scale. This has as many colours for bathymetry as for the oroggraphy but in this case we just need a blue ocean as we are really only interested in the orography. So in this case we will define a set of levels using *levs* and then match the colour scale to them. The wiki_2_0.rgb colour scale has as many colours for the ocean as for the land so we can use the above and below options .. image:: images/orog.png - :scale: 52% + :scale: 52% :: @@ -95,13 +95,13 @@ As a short example to show the flexibilty of the colour scale routines we will m f=cf.read('cfplot_data/12km_orog.nc')[0] cfp.cscale('wiki_2_0', ncols=16, below=2, above=14) cfp.levs(manual=np.arange(15)*150) - cfp.con(f, lines=False) + cfp.con(f, lines=False) User defined colour scales -------------------------- -Store these as rgb values in a file with one rgb value per line. i.e. +Store these as rgb values in a file with one rgb value per line. i.e. :: @@ -129,8 +129,8 @@ cfp.lineplot(g.subspace(pressure=925), color='plum') 2) Use the hexadecimal code for the colour. cfp.lineplot(g.subspace(pressure=925), color = '#eeefff') - - + + 3) Shades of grey can be selected with cmap(shade), where shade go from 0 to 1. cfp.lineplot(g.subspace(pressure=925), color=cmap(0.8)) @@ -384,9 +384,3 @@ scale42 .. image:: images/colour_scales/scale42.png scale43 .. image:: images/colour_scales/scale43.png scale44 .. image:: images/colour_scales/scale44.png ======= ===== - - - - - - diff --git a/docs/build/_sources/cylindrical.rst.txt b/docs/build/_sources/cylindrical.rst.txt index a833e4a..ab875cf 100644 --- a/docs/build/_sources/cylindrical.rst.txt +++ b/docs/build/_sources/cylindrical.rst.txt @@ -9,7 +9,7 @@ Example 1 - basic cylindrical projection ---------------------------------------- .. image:: images/fig1.png - :scale: 52% + :scale: 52% :: @@ -19,15 +19,15 @@ Example 1 - basic cylindrical projection cfp.con(f.subspace(time=15)) -| -| +| +| Example 2 - cylindrical projection with blockfill ------------------------------------------------- .. image:: images/fig2.png - :scale: 52% + :scale: 52% :: @@ -38,8 +38,8 @@ Example 2 - cylindrical projection with blockfill -| -| +| +| @@ -47,7 +47,7 @@ Example 3 - altering the map limits and contour levels ------------------------------------------------------ .. image:: images/fig3.png - :scale: 52% + :scale: 52% :: @@ -58,7 +58,3 @@ Example 3 - altering the map limits and contour levels cfp.mapset(lonmin=-15, lonmax=3, latmin=48, latmax=60) cfp.levs(min=265, max=285, step=1) cfp.con(f.subspace(time=15)) - - - - diff --git a/docs/build/_sources/download.rst.txt b/docs/build/_sources/download.rst.txt index e08da0d..93fd14c 100644 --- a/docs/build/_sources/download.rst.txt +++ b/docs/build/_sources/download.rst.txt @@ -53,13 +53,13 @@ The second line is optional and installs esmpy, together with the netcdf-fortran Windows ####### -We have a small development team and Linux is our main working environment. Windows isn't an option for us at present given our target user base. +We have a small development team and Linux is our main working environment. Windows isn't an option for us at present given our target user base. If you have a Windows operating system there are a couple of options for running Linux: 1) Install the Microsoft Windows Subsystem for Linux (WSL). Once this is working install cf-python and cf-plot as per the Linux instructions above. -2) Installing a Linux Virtual Machine is simple and works well. Installation instructions and a Mint Linux Virtual Machine are available at http://gws-access.ceda.ac.uk/public/ncas_climate/ajh/data_analysis_tools/VM. +2) Installing a Linux Virtual Machine is simple and works well. Installation instructions and a Mint Linux Virtual Machine are available at http://gws-access.ceda.ac.uk/public/ncas_climate/ajh/data_analysis_tools/VM. @@ -101,7 +101,8 @@ These are available in the cfplot_data directory which can be linked using: If you are on a different server then download the `sample netCDF datasets `_ - + +| | | | @@ -109,6 +110,3 @@ If you are on a different server then download the `sample netCDF datasets ` | :ref:`Polar plots ` | :ref:`Pressure/height plots ` | -:ref:`Hovmuller` +:ref:`Hovmuller` .. image:: images/fig13.png - :scale: 14% + :scale: 14% :target: vectors.html .. image:: images/fig17.png - :scale: 14% + :scale: 14% :target: stipple_plots.html .. image:: images/fig19.png - :scale: 14% + :scale: 14% :target: multiple_plots.html .. image:: images/cscale.png - :scale: 20% + :scale: 20% :target: colour_scales.html :ref:`Vector plots ` | @@ -45,16 +45,16 @@ cf-plot gallery .. image:: images/fig20.png - :scale: 14% + :scale: 14% :target: user_defined.html .. image:: images/fig21.png - :scale: 14% + :scale: 14% :target: rotated_pole.html .. image:: images/us01.png - :scale: 14% + :scale: 14% :target: unstructured.html .. image:: images/fig27.png - :scale: 11% + :scale: 11% :target: graphs.html @@ -66,24 +66,18 @@ cf-plot gallery .. image:: images/fig31.png - :scale: 14% + :scale: 14% :target: projections.html .. image:: images/fig40.png - :scale: 14% + :scale: 14% :target: trajectories.html .. image:: images/fig43.png - :scale: 14% + :scale: 14% :target: wrf.html :ref:`Projections ` | :ref:`Trajectories ` | :ref:`WRF data grids` - - - - - - diff --git a/docs/build/_sources/graphs.rst.txt b/docs/build/_sources/graphs.rst.txt index 60c334d..b874ff2 100644 --- a/docs/build/_sources/graphs.rst.txt +++ b/docs/build/_sources/graphs.rst.txt @@ -9,7 +9,7 @@ Example 27 - graph plot ----------------------- .. image:: images/fig27.png - :scale: 44% + :scale: 44% :: @@ -43,7 +43,7 @@ Other valid markers are: | '+' plus | 'x' x | 'D' diamond -| 'd' thin_diamond +| 'd' thin_diamond @@ -51,7 +51,7 @@ Example 28 - Line and legend plot --------------------------------- .. image:: images/fig28.png - :scale: 44% + :scale: 44% :: @@ -79,9 +79,9 @@ Example 28 - Line and legend plot | When making a multiple line plot: | a) Set the axis limits if required with cfp.gset before plotting the lines. Using cfp.gset after the last line has been plotted may give unexpected axis limits and / or labelling. This is a feature of Matplotlib. -| b) The last call to lineplot is the one that any of the above +| b) The last call to lineplot is the one that any of the above | axis overrides should be placed in. -| c) All calls to lineplot with the label attribute will appear in the legend. +| c) All calls to lineplot with the label attribute will appear in the legend. The cfp.plotvars.plot object contains the Matplotlib plot and will accept normal Matplotlib plotting commands. As an example of this the following code within a cfp.gopen() cfp.gclose() construct will make a legend that is independent of any previously made lines and attached labels. @@ -109,7 +109,7 @@ Valid locations for the legend_location keyword are: | 'upper center' | 'lower center' -When making a call to lineplot the following parameters overide any predefined CF defaults: +When making a call to lineplot the following parameters overide any predefined CF defaults: | title=None - plot title | xunits=None - x units @@ -127,7 +127,7 @@ Example 29 - Global average annual temperature ---------------------------------------------- .. image:: images/fig29.png - :scale: 44% + :scale: 44% In this example we subset a time data series of global temperature, area mean the data, convert to Celsius and plot a linegraph. @@ -154,9 +154,9 @@ Example 30 - Two axis plotting ------------------------------ .. image:: images/fig30.png - :scale: 44% + :scale: 44% -In this example we plot two x-axes, one with zonal mean zonal wind data and one with temperature data. Somewhat confusingly +In this example we plot two x-axes, one with zonal mean zonal wind data and one with temperature data. Somewhat confusingly the option for a twin x-axis is twiny=True. This is a Matplotlib keyword which has been adopted within the cf-plot code. @@ -185,11 +185,3 @@ the option for a twin x-axis is twiny=True. This is a Matplotlib keyword which cfp.lineplot(t2, color='b') cfp.gclose() - - - - - - - - diff --git a/docs/build/_sources/hovmuller.rst.txt b/docs/build/_sources/hovmuller.rst.txt index 12a9dd1..8012949 100644 --- a/docs/build/_sources/hovmuller.rst.txt +++ b/docs/build/_sources/hovmuller.rst.txt @@ -9,7 +9,7 @@ Example 10 - latitude-time -------------------------- .. image:: images/fig10.png - :scale: 52% + :scale: 52% :: @@ -17,36 +17,36 @@ Example 10 - latitude-time import cfplot as cfp f=cf.read('cfplot_data/tas_A1.nc')[0] cfp.cscale('plasma') - cfp.con(f.subspace(longitude=0), lines=False) + cfp.con(f.subspace(longitude=0), lines=False) -| -| +| +| Example 11 - latitude-time subset --------------------------------- .. image:: images/fig11.png - :scale: 52% + :scale: 52% :: import cf import cfplot as cfp f=cf.read('cfplot_data/tas_A1.nc')[0] - cfp.gset(-30, 30, '1960-1-1', '1980-1-1') + cfp.gset(-30, 30, '1960-1-1', '1980-1-1') cfp.levs(min=280, max=305, step=1) cfp.cscale('plasma') - cfp.con(f.subspace(longitude=0), lines=False) + cfp.con(f.subspace(longitude=0), lines=False) -| +| When using cfp.gset the correct date format is 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' - anything else will give unexpected results. -| -| +| +| @@ -54,7 +54,7 @@ Example 12 - longitude-time plot ------------------------------------------------------ .. image:: images/fig12.png - :scale: 52% + :scale: 52% :: @@ -65,8 +65,3 @@ Example 12 - longitude-time plot cfp.cscale('plasma') cfp.con(f.subspace(latitude=0), lines=F alse) - - - - - diff --git a/docs/build/_sources/internal_routines.rst.txt b/docs/build/_sources/internal_routines.rst.txt index 777efa0..917e2d4 100644 --- a/docs/build/_sources/internal_routines.rst.txt +++ b/docs/build/_sources/internal_routines.rst.txt @@ -16,7 +16,7 @@ Internal routines check_data.rst compare_arrays.rst compare_images.rst - cscale_get_map.rst + cscale_get_map.rst find_pos_in_array.rst fix_floats.rst gvals.rst @@ -36,7 +36,6 @@ Internal routines vloc.rst -| | | | @@ -47,7 +46,4 @@ Internal routines | | | - - - - +| diff --git a/docs/build/_sources/issues.rst.txt b/docs/build/_sources/issues.rst.txt index 069c637..8c1d2d5 100644 --- a/docs/build/_sources/issues.rst.txt +++ b/docs/build/_sources/issues.rst.txt @@ -19,7 +19,7 @@ i.e. if you make a plot using: f=cf.read('cfplot_data/ggap.nc')[1] cfp.con(f.collapse('mean','longitude')) -Then use cf-python to write out the data used to make the plot and then send the data (newfile.nc) and plotting line to me. +Then use cf-python to write out the data used to make the plot and then send the data (newfile.nc) and plotting line to me. :: @@ -44,25 +44,22 @@ If you are using arrays of data use numpy to write out the relevant data: np.save('lats.npy', lats) np.save('field.npy', field) -| -| -| +| +| +| -| -| -| -| -| -| -| -| -| -| -| -| - - - +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/docs/build/_sources/license.rst.txt b/docs/build/_sources/license.rst.txt index e93daec..6df9b00 100644 --- a/docs/build/_sources/license.rst.txt +++ b/docs/build/_sources/license.rst.txt @@ -8,13 +8,13 @@ License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -| -| -| -| -| -| -| -| +| +| +| +| +| +| +| +| diff --git a/docs/build/_sources/multiple_plots.rst.txt b/docs/build/_sources/multiple_plots.rst.txt index 12f3ddd..bc6baf1 100644 --- a/docs/build/_sources/multiple_plots.rst.txt +++ b/docs/build/_sources/multiple_plots.rst.txt @@ -12,7 +12,7 @@ Plots are arranged over rows and columns with the first plot at the top left and .. image:: images/fig19.png - :scale: 44% + :scale: 44% :: @@ -48,7 +48,7 @@ Cylidrical projection plots have an additional rider of having a degree in longi this type might not fill the plot area specified as expected. .. image:: images/fig19a.png - :scale: 44% + :scale: 44% :: @@ -73,12 +73,12 @@ Example 19b - user specified plot position to accomodate more than one color bar -------------------------------------------------------------------------------- The plot position on the page is set manually with the user_position=True parameter to cfp.gopen -and then passing the required plot size to cfp.gpos. Two calls to the cfp.cbar routine +and then passing the required plot size to cfp.gpos. Two calls to the cfp.cbar routine place colour bars on the plot. .. image:: images/fig19b.png - :scale: 44% + :scale: 44% :: @@ -104,9 +104,3 @@ place colour bars on the plot. cfp.cbar(levs=levs, position=[0.03, 0.2, 0.04, 0.6], orientation='vertical', title='topo_15lev') cfp.gclose() - - - - - - diff --git a/docs/build/_sources/older_documentation.rst.txt b/docs/build/_sources/older_documentation.rst.txt index ba2cc31..735597b 100644 --- a/docs/build/_sources/older_documentation.rst.txt +++ b/docs/build/_sources/older_documentation.rst.txt @@ -10,24 +10,21 @@ Below are two links to older documentation versions of cf-plot. `cf-plot 2.4.8 - Cartopy version `_ -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - - - +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/docs/build/_sources/polar.rst.txt b/docs/build/_sources/polar.rst.txt index a2e0c26..a381f75 100644 --- a/docs/build/_sources/polar.rst.txt +++ b/docs/build/_sources/polar.rst.txt @@ -9,7 +9,7 @@ Example 4 - north pole ---------------------- .. image:: images/fig4.png - :scale: 44% + :scale: 44% :: @@ -19,9 +19,9 @@ Example 4 - north pole cfp.mapset(proj='npstere') cfp.con(f.subspace(pressure=500)) -| -| -| +| +| +| | @@ -30,7 +30,7 @@ Example 4 - north pole Example 5 - south pole with 30 degrees south being the latitude plot limit -------------------------------------------------------------------------- .. image:: images/fig5.png - :scale: 44% + :scale: 44% :: @@ -39,5 +39,3 @@ Example 5 - south pole with 30 degrees south being the latitude plot limit f=cf.read('cfplot_data/ggap.nc')[1] cfp.mapset(proj='spstere', boundinglat=-30, lon_0=0) cfp.con(f.subspace(pressure=500)) - - diff --git a/docs/build/_sources/pressure.rst.txt b/docs/build/_sources/pressure.rst.txt index 5ad0ba9..9f7ae41 100644 --- a/docs/build/_sources/pressure.rst.txt +++ b/docs/build/_sources/pressure.rst.txt @@ -10,7 +10,7 @@ Example 6 - latitude - pressure ------------------------------- .. image:: images/fig6.png - :scale: 44% + :scale: 44% :: @@ -19,17 +19,17 @@ Example 6 - latitude - pressure f=cf.read('cfplot_data/ggap.nc')[2] cfp.con(f.subspace(longitude=0)) -| -| | -| +| +| +| Example 7 - latitude - pressure - zonal mean -------------------------------------------- .. image:: images/fig7.png - :scale: 44% + :scale: 44% :: @@ -38,10 +38,10 @@ Example 7 - latitude - pressure - zonal mean f=cf.read('cfplot_data/ggap.nc')[1] cfp.con(f.collapse('mean','longitude')) -| -| | -| +| +| +| @@ -52,7 +52,7 @@ Example 8 - latitude - log pressure .. image:: images/fig8.png - :scale: 44% + :scale: 44% :: @@ -70,7 +70,7 @@ Example 9 - longitude - pressure .. image:: images/fig9.png - :scale: 44% + :scale: 44% :: @@ -79,8 +79,3 @@ Example 9 - longitude - pressure import cfplot as cfp f=cf.read('cfplot_data/ggap.nc')[0] cfp.con(f.collapse('mean', 'latitude')) - - - - - diff --git a/docs/build/_sources/projections.rst.txt b/docs/build/_sources/projections.rst.txt index 13e7663..8972442 100644 --- a/docs/build/_sources/projections.rst.txt +++ b/docs/build/_sources/projections.rst.txt @@ -13,7 +13,7 @@ Example 31 - UKCP projection ---------------------------- .. image:: images/fig31.png - :scale: 52% + :scale: 52% :: @@ -25,8 +25,8 @@ Example 31 - UKCP projection cfp.setvars(grid_x_spacing=1, grid_y_spacing=1) cfp.con(f, lines=False) -| -| +| +| cf-plot looks for auxiliary coordinates of longitude and latitude and uses them if found. If they aren't present then cf-plot will generate the grid required using the projection_x_coordinate and projection_y_coordinate variables. For a blockfill plot as below it uses the latter method and the supplied bounds. @@ -49,7 +49,7 @@ New cfp.setvars options affecting the grid plotting for the UKCP grid are: Here we change the plotted grid with the grid_colour option to cfp.setvars, xticks and yticks options to cfp.con and make a blockfill plot. .. image:: images/fig32.png - :scale: 52% + :scale: 52% :: @@ -62,8 +62,8 @@ Here we change the plotted grid with the grid_colour option to cfp.setvars, xtic cfp.setvars(grid_colour='grey') cfp.con(f, lines=False, blockfill=True, xticks=np.arange(14)-11, yticks=np.arange(13)+49) -| -| +| +| @@ -71,7 +71,7 @@ Example 33 - OSGB and EuroPP projections ---------------------------------------- .. image:: images/fig33.png - :scale: 52% + :scale: 52% :: @@ -87,8 +87,8 @@ Example 33 - OSGB and EuroPP projections cfp.con(f, lines=False, colorbar_label_skip=2) cfp.gclose() -| -| +| +| @@ -99,7 +99,7 @@ Example 34 - Cropped Lambert conformal projection ------------------------------------------------- .. image:: images/fig34.png - :scale: 52% + :scale: 52% Lambert conformal projections can now be cropped as in the following code: @@ -114,8 +114,8 @@ Lambert conformal projections can now be cropped as in the following code: -| -| +| +| @@ -124,7 +124,7 @@ Example 35 - Mollweide projection --------------------------------- .. image:: images/fig35.png - :scale: 52% + :scale: 52% :: @@ -141,7 +141,7 @@ Example 36 - Mercator projection -------------------------------- .. image:: images/fig36.png - :scale: 52% + :scale: 52% :: @@ -152,14 +152,14 @@ Example 36 - Mercator projection cfp.mapset(proj='merc') cfp.con(f.subspace(time=15)) -| -| +| +| Example 37 - Orthographic projection ------------------------------------ .. image:: images/fig37.png - :scale: 52% + :scale: 52% :: @@ -172,15 +172,15 @@ Example 37 - Orthographic projection -| -| +| +| Example 38 - Robinson projection -------------------------------- .. image:: images/fig38.png - :scale: 52% + :scale: 52% :: @@ -193,10 +193,5 @@ Example 38 - Robinson projection -| -| - - - - - +| +| diff --git a/docs/build/_sources/rotated_pole.rst.txt b/docs/build/_sources/rotated_pole.rst.txt index 16e63f4..32d238b 100644 --- a/docs/build/_sources/rotated_pole.rst.txt +++ b/docs/build/_sources/rotated_pole.rst.txt @@ -10,7 +10,7 @@ Example 21 - rotated pole data plot .. image:: images/fig21.png - :scale: 52% + :scale: 52% :: @@ -21,8 +21,8 @@ Example 21 - rotated pole data plot cfp.con(f) -| -| +| +| Example 22 - rotated pole data on the native grid @@ -40,7 +40,7 @@ This plot shows some rotated pole data on the native grid. Notice the way that t f=cf.read('cfplot_data/rgp.nc')[0] cfp.cscale('plasma') cfp.mapset(proj='rotated') - cfp.con(f) + cfp.con(f) @@ -55,18 +55,18 @@ In this plot a cylindrical projection plot of rotated pole data is overlayed wit | a) eastward wind and westward wind are relative to longitude and latitude axes | b) x-wind and y-wind are relative to the rotated pole axes -Here we have eastward and westward wind so these can be plotted as normal over a cylindrical projection. For +Here we have eastward and westward wind so these can be plotted as normal over a cylindrical projection. For the case of data in case b) above, the x-wind and y-wind will need to be appropriately rotated onto a cylindrical grid. .. image:: images/fig23.png - :scale: 52% + :scale: 52% :: import cf import cfplot as cfp - + f=cf.read('cfplot_data/20160601-05T0000Z_INCOMPASS_km4p4_uv_RH_500.nc') cfp.mapset(50, 100, 5, 35) cfp.levs(0, 90, 15, extend='neither') @@ -77,15 +77,5 @@ the case of data in case b) above, the x-wind and y-wind will need to be appropr cfp.gclose() -| -| - - - - - - - - - - +| +| diff --git a/docs/build/_sources/routines.rst.txt b/docs/build/_sources/routines.rst.txt index 2613746..6de03f3 100644 --- a/docs/build/_sources/routines.rst.txt +++ b/docs/build/_sources/routines.rst.txt @@ -7,7 +7,7 @@ Contents: .. toctree:: :maxdepth: 2 - + axes.rst cbar.rst con.rst @@ -30,12 +30,12 @@ Contents: -| -| -| -| -| -| -| -| +| +| +| +| +| +| +| +| | diff --git a/docs/build/_sources/stipple_plots.rst.txt b/docs/build/_sources/stipple_plots.rst.txt index 5479a96..c8c5f33 100644 --- a/docs/build/_sources/stipple_plots.rst.txt +++ b/docs/build/_sources/stipple_plots.rst.txt @@ -10,7 +10,7 @@ Example 17 - stipple plot ------------------------- .. image:: images/fig17.png - :scale: 44% + :scale: 44% :: @@ -26,12 +26,12 @@ Example 17 - stipple plot cfp.gclose() -| +| | | -Stipple plots are usually used to display significance. The above is a test plot -with a temperature field stippled between two different limits. A contour field +Stipple plots are usually used to display significance. The above is a test plot +with a temperature field stippled between two different limits. A contour field is displayed underneath to show that the stippling is in the correct regions. @@ -40,7 +40,7 @@ Example 18 - polar stipple plot ------------------------------- .. image:: images/fig18.png - :scale: 44% + :scale: 44% :: @@ -54,4 +54,3 @@ Example 18 - polar stipple plot cfp.con(g) cfp.stipple(f=g, min=265, max=295, size=100, color='#00ff00') cfp.gclose() - diff --git a/docs/build/_sources/training.rst.txt b/docs/build/_sources/training.rst.txt index df5c130..acb23df 100644 --- a/docs/build/_sources/training.rst.txt +++ b/docs/build/_sources/training.rst.txt @@ -8,7 +8,7 @@ Training material We run one day courses on cf-python / cf-plot using the following training material. -`https://github.com/NCAS-CMS/cf-training `_ - +`https://github.com/NCAS-CMS/cf-training `_ - @@ -25,6 +25,4 @@ We run one day courses on cf-python / cf-plot using the following training mater | | | -| - - +| diff --git a/docs/build/_sources/trajectories.rst.txt b/docs/build/_sources/trajectories.rst.txt index 7504bb6..eff6b62 100644 --- a/docs/build/_sources/trajectories.rst.txt +++ b/docs/build/_sources/trajectories.rst.txt @@ -12,7 +12,7 @@ Example 39 - basic track plotting --------------------------------- .. image:: images/fig39.png - :scale: 52% + :scale: 52% @@ -25,21 +25,21 @@ Example 39 - basic track plotting cfp.traj(f) -| +| Here a plot of relative vorticity tracks is made in the cylindrical projection. -| -| +| +| Example 40 - tracks in the polar stereographic projection --------------------------------------------------------- .. image:: images/fig40.png - :scale: 52% + :scale: 52% @@ -53,8 +53,8 @@ Example 40 - tracks in the polar stereographic projection cfp.traj(f) -| -| +| +| @@ -62,7 +62,7 @@ Example 41 - feature propagation over Europe -------------------------------------------- .. image:: images/fig41.png - :scale: 52% + :scale: 52% @@ -76,18 +76,18 @@ Example 41 - feature propagation over Europe cfp.traj(f, vector=True, markersize=0.0, fc='b', ec='b') -| +| Data with lots of tracks takes several seconds to plot as the direction vectors have to be plotted individually whether they are on the plot or not. - + Example 42 - intensity legend ----------------------------- .. image:: images/fig42.png - :scale: 52% + :scale: 52% @@ -108,20 +108,20 @@ Example 42 - intensity legend | -In this plot the tracks between 1979-12-01 and 1979-12-30 are selected and +In this plot the tracks between 1979-12-01 and 1979-12-30 are selected and labelled according intensity with a colorbar. | | - + Example 42a - intensity legend with lines ----------------------------------------- .. image:: images/fig42a.png - :scale: 52% + :scale: 52% @@ -140,4 +140,3 @@ Example 42a - intensity legend with lines Selecting legend_lines=True plots lines only and colours them according to the sum of the start and end point divided by two. This can be a useful option when there are lots of trajectories. - diff --git a/docs/build/_sources/unstructured.rst.txt b/docs/build/_sources/unstructured.rst.txt index 8010ad5..471f708 100644 --- a/docs/build/_sources/unstructured.rst.txt +++ b/docs/build/_sources/unstructured.rst.txt @@ -2,17 +2,23 @@ .. _unstructured: -Unstructured grids -****************** +Unstructured grids and UGRID +**************************** -Unstructured grids have data points in non-regular locations. Examples of these are the LFRic model grid, the ORCA ocean grid and weather station data. +*Unstructured* grids have data points in non-regular locations. Examples of +these are the LFRic model grid, the ORCA ocean grid and weather station data. -The `UGRID `_ data storage convention for netCDF isn't yet part of the CF metadata conventions but cf-python and cf-plot will be updated once it is. This page shows how to plot data that is both in UGRID compliant netCDF and numpy arrays of unstructured data. +The `UGRID Conventions `_ +are conventions for storing unstructured (or flexible mesh) model data in +netCDF. As of CF-1.11, version 1.0 of UGRID is +`partially included within the CF Conventions `_. +This page demonstrates how to plot data in the form of both UGRID-compliant +netCDF and NumPy arrays of unstructured data. .. image:: images/us01.png - :scale: 52% + :scale: 52% :: @@ -35,7 +41,7 @@ Here we identify the fields in the data that have the longitudes and latitudes f .. image:: images/us02.png - :scale: 52% + :scale: 52% :: @@ -57,7 +63,7 @@ Here the projection is changed to show the north pole. .. image:: images/us03.png - :scale: 52% + :scale: 52% :: @@ -75,7 +81,7 @@ Orca2 grid ---------- .. image:: images/us04.png - :scale: 52% + :scale: 52% :: @@ -107,9 +113,9 @@ Station data Here we read in temperature data in a text file from meteorological stations around the British Isles and make a contour plot. - + .. image:: images/us05.png - :scale: 52% + :scale: 52% :: @@ -136,8 +142,8 @@ Here we read in temperature data in a text file from meteorological stations aro cfp.con(x=lons, y=lats, f=temp, ptype=1, colorbar_orientation='vertical') -| -| +| +| Station data - check of data values @@ -160,14 +166,8 @@ To see if this plot is correct we can add some extra code to that above to plot .. image:: images/us06.png - :scale: 52% - - -| -| - - - - + :scale: 52% +| +| diff --git a/docs/build/_sources/user_defined.rst.txt b/docs/build/_sources/user_defined.rst.txt index 51afa50..a19582d 100644 --- a/docs/build/_sources/user_defined.rst.txt +++ b/docs/build/_sources/user_defined.rst.txt @@ -9,7 +9,7 @@ Example 20 - User labelling of axes ----------------------------------- .. image:: images/fig20a.png - :scale: 44% + :scale: 44% :: @@ -17,7 +17,7 @@ Example 20 - User labelling of axes import cf import cfplot as cfp f=cf.read('cfplot_data/Geostropic_Adjustment.nc')[0] - cfp.con(f.subspace[9]) + cfp.con(f.subspace[9]) @@ -25,7 +25,7 @@ Example 20 - User labelling of axes In the following plot the axes were labelled with the axes command before making a contour map of the data. The xticklabels and yticklabels options can be used to fine tune the axis labels. .. image:: images/fig20.png - :scale: 44% + :scale: 44% :: @@ -34,9 +34,5 @@ In the following plot the axes were labelled with the axes command before making import cfplot as cfp import numpy as np f=cf.read('cfplot_data/Geostropic_Adjustment.nc')[0] - cfp.con(f.subspace[9], title='test data', xticks=np.arange(5)*100000+100000, - yticks=np.arange(7)*2000+2000, xlabel='x-axis', ylabel='z-axis') - - - - + cfp.con(f.subspace[9], title='test data', xticks=np.arange(5)*100000+100000, + yticks=np.arange(7)*2000+2000, xlabel='x-axis', ylabel='z-axis') diff --git a/docs/build/_sources/user_guide.rst.txt b/docs/build/_sources/user_guide.rst.txt index 1c3d3b9..c23b9d8 100644 --- a/docs/build/_sources/user_guide.rst.txt +++ b/docs/build/_sources/user_guide.rst.txt @@ -8,8 +8,8 @@ cf-plot user guide | introduction_ to cf-plot -| access_ - where cf-plot is installed and how to install it -| +| access_ - where cf-plot is installed and how to install it +| | contours_ - making contour plots | vectors_ - plotting vectors | multiple_ plots on a page and plot positioning @@ -17,7 +17,7 @@ cf-plot user guide | significance_ - plots | graphsUG_ - making graphs | colour_ scales - using and changing colour scales -| +| | appendixA_ - introduction to cf-python | appendixB_ - passing data via arrays | appendixC_ - map projections and options @@ -34,10 +34,10 @@ Introduction ############ -cf-plot is a set of Python functions for making common contour, vector and line plots that climate researchers use. cf-plot generally uses `cf-python `_ to present the data and CF attributes for plotting. It can also use numpy arrays of data as the input fields making for flexible plotting of data. cf-plot uses the Python numpy, matplotlib and scipy libraries. +cf-plot is a set of Python functions for making common contour, vector and line plots that climate researchers use. cf-plot generally uses `cf-python `_ to present the data and CF attributes for plotting. It can also use numpy arrays of data as the input fields making for flexible plotting of data. cf-plot uses the Python numpy, matplotlib and scipy libraries. -At the core of cf-plot are a set of functions for making and controlling plots. +At the core of cf-plot are a set of functions for making and controlling plots. | **Plot making operators** | :ref:`con` - make a contour plot @@ -55,7 +55,7 @@ At the core of cf-plot are a set of functions for making and controlling plots. | :ref:`levs` - define contour levels | :ref:`cscale` - select and change colour scales | :ref:`mapset` - set mapping parameters -| :ref:`reset` - reset all plot parameters +| :ref:`reset` - reset all plot parameters | :ref:`setvars` - set a variety of plot parameters @@ -79,7 +79,7 @@ cf-python and cf-plot are pre-installed on the following platforms. | export PATH=/home/n02/n02/ajh/anaconda3/bin:$PATH | ln -s /home/n02/n02/ajh/cfplot_data ~ - + | **Reading University RACC cluster** | module load ncas_anaconda3 | ln -s /share/apps/NCAS/cfplot_data ~ @@ -114,7 +114,7 @@ Cylindrical projection .. image:: images/fig1.png - :scale: 52% + :scale: 52% @@ -127,11 +127,11 @@ Note that for a contour plot two dimensional data is required. -Dimensions that have one element, such as time in this instance, are ignored. +Dimensions that have one element, such as time in this instance, are ignored. -The **cfp.mapset** routine is used to change the map area and projection. +The **cfp.mapset** routine is used to change the map area and projection. **cfp.mapset(lonmin=-15, lonmax=3, latmin=48, latmax=60)** sets the map to a view over the British Isles. The cfp.mapset command is persistent in that any further map plots will use the same map projection and limits without having to specify the same map again. The levels are taken from the whole field and in this example we specify the levels explicitly with the **cfp.levs** command. :: @@ -144,12 +144,12 @@ The **cfp.mapset** routine is used to change the map area and projection. cfp.con(f.subspace(time=15)) .. image:: images/fig3.png - :scale: 52% + :scale: 52% -The default settings are for colour fill with contour lines over the top. These can be changed with the **fill=False** and **lines=False** flags to **cfp.con**. +The default settings are for colour fill with contour lines over the top. These can be changed with the **fill=False** and **lines=False** flags to **cfp.con**. To reset the mapping to the default cylindrical projection -180 to 180 in longitude and -90 to 90 in latitude use **cfp.mapset()**. Likewise to reset the contour levels use **cfp.levs()**. @@ -172,8 +172,8 @@ Blockfill plots in the cylindrical projection are made using the **blockfill=Tru .. image:: images/fig2.png - :scale: 52% - + :scale: 52% + ^^^^^^^^^^^^^^^^^^^^^^^^^ Polar stereographic plots @@ -191,7 +191,7 @@ Polar Stereographic plots are set using **proj='npstere'** or **proj='spstere'** .. image:: images/fig4.png - :scale: 52% + :scale: 52% @@ -208,7 +208,7 @@ The **mapset** **bounding_lat** and **lon_0** parameters are used to set the lat .. image:: images/fig5.png - :scale: 52% + :scale: 52% @@ -237,7 +237,7 @@ The latitude-pressure plot below is made by using the cf subspace method to sele .. image:: images/fig6.png - :scale: 52% + :scale: 52% A mean of the data along the longitude (zonal mean) is made using the cf.collapse method. @@ -251,7 +251,7 @@ A mean of the data along the longitude (zonal mean) is made using the cf.collaps .. image:: images/fig7.png - :scale: 52% + :scale: 52% @@ -266,7 +266,7 @@ To make a log pressure on the y axis use the ylog=True flag to the con routine. cfp.con(f.collapse('mean','longitude'), ylog=True) .. image:: images/fig8.png - :scale: 52% + :scale: 52% ^^^^^^^^^^^^^^^ @@ -285,7 +285,7 @@ A Hovmuller plot is one of longitude or latitude versus time as in the following .. image:: images/fig10.png - :scale: 52% + :scale: 52% :: @@ -300,7 +300,7 @@ A Hovmuller plot is one of longitude or latitude versus time as in the following .. image:: images/fig11.png - :scale: 52% + :scale: 52% @@ -332,7 +332,7 @@ Vector plots are made using the **cfp.vect** routine. The u and v data must hav .. image:: images/fig13.png - :scale: 52% + :scale: 52% | | @@ -362,7 +362,7 @@ In this example vectors are overlaid on a contour plot. Usually a plot is displa .. image:: images/fig14.png - :scale: 52% + :scale: 52% @@ -375,26 +375,26 @@ Here we make a zonal mean vector plot with different vector keys and scaling fac c=cf.read('cfplot_data/vaAMIPlcd_DJF.nc') c=c.subspace(Y=cf.wi(-60,60)) - c=c.subspace(X=cf.wi(80,160)) + c=c.subspace(X=cf.wi(80,160)) c=c.collapse('T: mean X: mean') - g=cf.read('cfplot_data/wapAMIPlcd_DJF.nc') + g=cf.read('cfplot_data/wapAMIPlcd_DJF.nc') g=g.subspace(Y=cf.wi(-60,60)) g=g.subspace(X=cf.wi(80,160)) g=g.collapse('T: mean X: mean') - cfp.vect(u=c, v=-g, key_length=[4, 0.2], scale=[20.0, 0.2], + cfp.vect(u=c, v=-g, key_length=[4, 0.2], scale=[20.0, 0.2], stride=[2,1], width=0.02, headwidth=6, headlength=6, - headaxislength=5, pivot='middle', title='DJF', + headaxislength=5, pivot='middle', title='DJF', key_location=[0.95, -0.05]) .. image:: images/fig16.png - :scale: 44% + :scale: 44% -A streamplot is used to show fluid flow and 2D field gradients. In this first example the data goes from 0 to 358.875 in longitude. The cartopy / matplotlib interface seems to need the data to be inside the data window in longitude so we anchor the data in cf-python using the anchor method to start at -180 in longitude. If we didn't do this any longitudes less than zero would have no streams drawn. +A streamplot is used to show fluid flow and 2D field gradients. In this first example the data goes from 0 to 358.875 in longitude. The cartopy / matplotlib interface seems to need the data to be inside the data window in longitude so we anchor the data in cf-python using the anchor method to start at -180 in longitude. If we didn't do this any longitudes less than zero would have no streams drawn. :: @@ -408,12 +408,12 @@ A streamplot is used to show fluid flow and 2D field gradients. In this first e u = u.anchor('X', -180) v = v.anchor('X', -180) - + cfp.stream(u=u, v=v, density=2) .. image:: images/fig16b.png - :scale: 44% + :scale: 44% @@ -426,7 +426,7 @@ In the second streamplot example a colorbar showing the intensity of the wind is mag = np.squeeze(magnitude.array) cfp.levs(0, 60, 5, extend='max') - cfp.cscale('viridis', ncols=13) + cfp.cscale('viridis', ncols=13) cfp.gopen() cfp.stream(u=u, v=v, density=2, color=mag) cfp.cbar(levs=cfp.plotvars.levels, position=[0.12, 0.12, 0.8, 0.02], title='Wind magnitude') @@ -434,7 +434,7 @@ In the second streamplot example a colorbar showing the intensity of the wind is .. image:: images/fig16c.png - :scale: 44% + :scale: 44% @@ -469,10 +469,10 @@ To make multiple plots on the page open a graphic file with **cfp.gopen** and pa .. image:: images/fig19.png - :scale: 52% + :scale: 52% -Plot spacing options are located in **cfp.gopen** +Plot spacing options are located in **cfp.gopen** | orientation='landscape' - orientation - also takes 'portrait' | figsize=[11.7, 8.3] - figure size in inches @@ -490,38 +490,38 @@ Plot spacing options are located in **cfp.gopen** | position - user specified colorbar position in normalised | plot coordinates [left, bottom, width, height] | shrink - default=1.0 - scale colorbar along length -| fraction - default = 0.21 - space for the colorbar in +| fraction - default = 0.21 - space for the colorbar in | normalised plot coordinates | thick - set height of colorbar - default = 0.015, | in normalised plot coordinates -| anchor - default=0.3 - anchor point of colorbar within the fraction space. +| anchor - default=0.3 - anchor point of colorbar within the fraction space. | 0.0 = close to plot, 1.0 = further away | | -When making map plots the default setting is for one degree of longitude to be the same size as -one degree of longitude on the plot. This will make some plots smaller than the area allocated -to them as the plot size will be changed to fit within the plot area. The aspect option to +When making map plots the default setting is for one degree of longitude to be the same size as +one degree of longitude on the plot. This will make some plots smaller than the area allocated +to them as the plot size will be changed to fit within the plot area. The aspect option to **cfp.mapset** can be used to change the aspect ratio if desired. | aspect = 'equal' - the default, 1 degree longitude is the same size as one degree of latitude | aspect = 'auto' - map fills the plot area -| aspect = number - a circle will be stretched such that the height is num times the width. +| aspect = number - a circle will be stretched such that the height is num times the width. | aspect=1 is the same as aspect='equal'. -User specified plot limits are set by first specifying the **user_position=True** parameter to -**cfp.gopen** and then the plot position to the gpos routines. The **xmin, xmax, ymin, ymax** -paramenters for the plot display area are in plot extent normalised coordinates. These are 0.0 -for bottom or left and 1.0 for top or right of the plot area. +User specified plot limits are set by first specifying the **user_position=True** parameter to +**cfp.gopen** and then the plot position to the gpos routines. The **xmin, xmax, ymin, ymax** +paramenters for the plot display area are in plot extent normalised coordinates. These are 0.0 +for bottom or left and 1.0 for top or right of the plot area. -Cylidrical projection plots have an additional rider of having a degree in longitude and latitude +Cylidrical projection plots have an additional rider of having a degree in longitude and latitude being the same size so plots of this type might not fill the plot area specified as expected. .. image:: images/fig19a.png - :scale: 44% + :scale: 44% :: @@ -545,14 +545,14 @@ being the same size so plots of this type might not fill the plot area specified -The indication that the plot position on the page is to be set manually is made with the -**user_position=True** parameter to **cfp.gopen**. The required plot position is set in **cfp.gpos** -with the **xmin, xmax, ymin, ymax** parameters. Two calls to the **cfp.cbar** routine then place +The indication that the plot position on the page is to be set manually is made with the +**user_position=True** parameter to **cfp.gopen**. The required plot position is set in **cfp.gpos** +with the **xmin, xmax, ymin, ymax** parameters. Two calls to the **cfp.cbar** routine then place colour bars on the plot with different colour scales and contour levels. .. image:: images/fig19b.png - :scale: 44% + :scale: 44% :: @@ -592,7 +592,7 @@ Data stored in contiguous ragged array format, such as from Kevin Hodges's TRACK .. image:: images/fig39.png - :scale: 52% + :scale: 52% @@ -619,7 +619,7 @@ Stipple plots A stipple plot is usually used to show areas of significance such as 95% or greater confidence. These plots use the overlay technique as used in the previous contour/vector plot. In these plots we show a coutour plot and a stipple plot between varous contour levels to show that the stippling works correctly. For different significance levels such as confidences of 95% and 99% chosing a different sized or colour marker is a common plot technique. :: - + import cf import cfplot as cfp f=cf.read('cfplot_data/tas_A1.nc')[0] @@ -633,7 +633,7 @@ A stipple plot is usually used to show areas of significance such as 95% or grea .. image:: images/fig17.png - :scale: 52% + :scale: 52% :: @@ -644,14 +644,14 @@ A stipple plot is usually used to show areas of significance such as 95% or grea g=f.subspace(time=15) cfp.gopen() cfp.mapset(proj='npstere') - cfp.cscale('magma') + cfp.cscale('magma') cfp.con(g) cfp.stipple(f=g, min=265, max=295, size=100, color='#00ff00') cfp.gclose() .. image:: images/fig18.png - :scale: 52% + :scale: 52% | | @@ -667,7 +667,7 @@ Graph plots To make a graph plot use the **cfp.lineplot** function as below on a single line of data in a field. -:: +:: import cf import cfplot as cfp @@ -678,7 +678,7 @@ To make a graph plot use the **cfp.lineplot** function as below on a single line .. image:: images/fig27.png - :scale: 52% + :scale: 52% @@ -709,13 +709,13 @@ To make a graph plot use the **cfp.lineplot** function as below on a single line To make a multiple line plot use the gopen, gclose commands to enclose the plotting commands as in the example below. | When making a multiple line plot: -| a) Set the axis limits if required with **cfp.gset** before plotting the lines. -| Using **cfp.gset** after the last line has been plotted may give unexpected axis +| a) Set the axis limits if required with **cfp.gset** before plotting the lines. +| Using **cfp.gset** after the last line has been plotted may give unexpected axis | limits and / or labelling. This is a feature of Matplotlib. | b) The last call to **cfp.lineplot** is the one that any of axis labelling overrides should be placed in. -| c) All calls to **cfp.lineplot** with the **label** attribute set will appear in the legend. +| c) All calls to **cfp.lineplot** with the **label** attribute set will appear in the legend. | d) When plotting time data from different models set the time units to be the same as the first line plotted to -| avoid different time axes being used i.e. +| avoid different time axes being used i.e. | **cfp.lineplot(f)** | **g.coord('T').units = f.coord('T').units** | **cfp.lineplot(g)** @@ -746,7 +746,7 @@ To make a multiple line plot use the gopen, gclose commands to enclose the plott .. image:: images/fig28.png - :scale: 52% + :scale: 52% @@ -755,7 +755,7 @@ To make a multiple line plot use the gopen, gclose commands to enclose the plott Setting Contour Levels ^^^^^^^^^^^^^^^^^^^^^^ -cf-plot generally does a reasonable job of setting appropriate contour levels. In the cases where it doesn't do this or you need a consistent set of levels between plots for comparison purposes use the levs routine. +cf-plot generally does a reasonable job of setting appropriate contour levels. In the cases where it doesn't do this or you need a consistent set of levels between plots for comparison purposes use the levs routine. The **cfp.levs** command manually sets the contour levels. | **min=min** - minimum level @@ -771,7 +771,7 @@ Use the **cfp.levs** command when a predefined set of levels is required. The ** cfp.levs(manual=[-10, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 10]) Once a user call is made to levs the levels are persistent. i.e. the next plot will use the same set of levels. Use **cfp.levs()** to reset to undefined levels i.e. let cf-plot generate the levels again. -Once the **cfp.levs** command is used you'll need to think about the associated colour scale. +Once the **cfp.levs** command is used you'll need to think about the associated colour scale. .. _colour: @@ -781,11 +781,11 @@ Once the **cfp.levs** command is used you'll need to think about the associated Colour scales ^^^^^^^^^^^^^ -There are around 140 colour scales included with cf-plot. Colour scales are set with the cscale command. There are two default colour scales that suit differing types of data. +There are around 140 colour scales included with cf-plot. Colour scales are set with the cscale command. There are two default colour scales that suit differing types of data. A continuous scale **cfp.scale('viridis')** that goes from blue to green and then yellow and suits data that has no zero in it. For example air temperature in Kelvin or geopotential height - see example 1 in the gallery plots. -A diverging scale **cfp.cscale('scale1')** that goes from blue to red and suits data with a zero in it. For example temperature in Celsius or zonal wind - see example 4 in the gallery plots. +A diverging scale **cfp.cscale('scale1')** that goes from blue to red and suits data with a zero in it. For example temperature in Celsius or zonal wind - see example 4 in the gallery plots. :: @@ -793,7 +793,7 @@ A diverging scale **cfp.cscale('scale1')** that goes from blue to red and suits cfp.cscale('scale1') .. image:: images/cs1.png - :scale: 52% + :scale: 52% If no call has been made to adjust the colour scale then continuous and diverging colour scales are self adjusting to fit the number of levels automatically generated by cf-plot or specified by the user with the **cfp.levs** command. This behaviour is also followed for a simple call to **cfp.cscale** specifying a different colour scale - for example **cfp.cscale('radar')** to select the radar colour scheme. @@ -807,7 +807,7 @@ To change the number of colours in a scale use the ncols parameters. cfp.levs(min=-5, max=5, step=1) .. image:: images/cs2.png - :scale: 52% + :scale: 52% To change the number of colours above and below the mid-point of the scale use the above and below parameters. This is useful for fields where you have differing extents of data above and below the zero line. @@ -818,7 +818,7 @@ To change the number of colours above and below the mid-point of the scale use t cfp.levs(min=-30, max=60, step=10) .. image:: images/cs3.png - :scale: 52% + :scale: 52% For data where you need white to indicate that this data region is insignificant use the white=white parameter. This can take single or multiple values. @@ -829,7 +829,7 @@ For data where you need white to indicate that this data region is insignificant cfp.levs(manual=[-10,-8, -6, -4, -2, 2, 4, 6, 8, 10]) .. image:: images/cs4.png - :scale: 52% + :scale: 52% To reverse a colour scale use the **reverse=True** option to **cfp.cscale** and specify the number of colours required. @@ -840,12 +840,12 @@ To reverse a colour scale use the **reverse=True** option to **cfp.cscale** and Producing a uniform colour scale ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The uniform parameter may be of use when using a set of contour levels where there is wide mismatch between the +The uniform parameter may be of use when using a set of contour levels where there is wide mismatch between the above and below numbers. **uniform = False** - produce a uniform colour scale. For example: if **below=3** and **above=10** are specified then initially **below=10** and **above=10** are used. The -colour scale is then cropped to use scale colours 6 to 19. This produces a more uniform intensity colour +colour scale is then cropped to use scale colours 6 to 19. This produces a more uniform intensity colour scale than one where all the blues are compressed into 3 colours. @@ -863,10 +863,10 @@ Colour scales are stored as red green blue values on a scale of 0 to 255. Put th will give a red white blue colour scale. If the file is saved as /home/swsheaps/rwb.txt it is read in using :: - + cfp.cscale('/home/swsheaps/rwb.txt') -If the colour scale selected has too few colours for the number of contour levels then the colours will be used cyclically. +If the colour scale selected has too few colours for the number of contour levels then the colours will be used cyclically. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1152,7 +1152,7 @@ Colour bars are often associated with filled colour contour plots and the option Below are some examples of calls to **cfp.cbar** .. image:: images/cbar.png - :scale: 52% + :scale: 52% :: @@ -1178,7 +1178,7 @@ Below are some examples of calls to **cfp.cbar** cfp.cbar(position=[0.1, 0.45, 0.4, 0.01], text_up_down=True, title='text_up_down') - cfp.cbar(position=[0.1, 0.30, 0.4, 0.01], text_down_up=True, drawedges=False, + cfp.cbar(position=[0.1, 0.30, 0.4, 0.01], text_down_up=True, drawedges=False, title='text_down_up, drawedges=False') @@ -1188,12 +1188,12 @@ Below are some examples of calls to **cfp.cbar** labels_mid=['a', 'b', 'c'] - cfp.cbar(position=[0.55, 0.9, 0.4, 0.01], extend ='neither', + cfp.cbar(position=[0.55, 0.9, 0.4, 0.01], extend ='neither', levs=levs, labels=labels, title='Normal labelling at the division boundary') - cfp.cbar(position=[0.55, 0.75, 0.4, 0.01], extend ='neither', mid = True, + cfp.cbar(position=[0.55, 0.75, 0.4, 0.01], extend ='neither', mid = True, levs=levs, labels=labels_mid, title='mid=True and three colorbar labels') - + #Turn off plot axes cfp.plotvars.plot.axis('off') @@ -1208,7 +1208,7 @@ Below are some examples of calls to **cfp.cbar** Labelling time axes ^^^^^^^^^^^^^^^^^^^ -The default time axis labelling in cf-plot might not be what is required and here is some information on +The default time axis labelling in cf-plot might not be what is required and here is some information on using cf-python to extract values for yourself. | **f=cf.read('cfplot_data/tas_A1.nc')[0]** @@ -1250,14 +1250,14 @@ To find the time value for to the tick position for January 1st 1980 00:00hrs: | **np.min(cf.Data(cf.dt('1980-01-01 00:00:00'), units=f.construct('T').Units).array)** | 43200.0 -With this technique arrays of custom tick label and positions can be constructed and passed to +With this technique arrays of custom tick label and positions can be constructed and passed to the cfp.lineplot or to the cfp.con routines. Note the correct date format is **'YYYY-MM-DD'** or **'YYYY-MM-DD HH:MM:SS'** - anything else will give unexpected results. In this example we generate labels for the start of the months in 1980. If the middle of the month was to be labelled then the day -number would be changed to be 15. Our xtick positions are accumulated using the above method in the xticks array as a numerical position +number would be changed to be 15. Our xtick positions are accumulated using the above method in the xticks array as a numerical position along the axis. In this case we manually specify out tick labels using the xticklabels array of strings. :: @@ -1281,14 +1281,14 @@ along the axis. In this case we manually specify out tick labels using the xtic g = f.collapse('X: mean').subspace(Y=0.0) cfp.gset('1980-01-01', '1981-01-01', 299, 302) - cfp.lineplot(g, xticks=xticks, xticklabels=xticklabels, + cfp.lineplot(g, xticks=xticks, xticklabels=xticklabels, yticks=[299, 300, 301, 302], xlabel='Time', title='Air temperature at the equator in 1980') .. image:: images/time_axis_labelling.png - :scale: 44% + :scale: 44% Axis labels can also be placed at an angle which in the case of time axis labels is often a way of displaying more lengthy labels. @@ -1301,7 +1301,7 @@ Selecting data that has a lot of decimal places in the axis values ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Axes with a lot of decimal places can cause issues with numeric representation and rounding, -In one case +In one case | **cfp.lineplot(f.subspace(latitude=50.17530806))** @@ -1328,7 +1328,7 @@ After swapping the tolerance to 1e-5 the following finds the latitide as expecte We could have worked around this issue with -| **cfp.lineplot(f.subspace(latitude=cf.wi(50, 50.2)))** +| **cfp.lineplot(f.subspace(latitude=cf.wi(50, 50.2)))** @@ -1342,7 +1342,7 @@ The priority order of axis labeling in order of preference is: | 2) user defined by axes command | 3) labels generated internally -For 1 and 2 the available options are +For 1 and 2 the available options are | xticks=None - xtick positions | xticklabels=None - xtick labels @@ -1358,12 +1358,12 @@ When specifying the xticklabels or yticklabels the supplied values must be a str Blockfill plots ^^^^^^^^^^^^^^^ -Blockfill plots used to use the pcolormesh method but this had the advantage of being fast but gave incorrect results with masked data or when the data range wasn't extended in both 'min' and 'max' directions. The blockfill method now uses PolyCollection from matplotlib.collections to draw the polygons for each colour interval specified by the contour levels. This also has the advantage that blockfill is now available in other projections such as polar stereographic. When doing blockfill plots of larger numbers of points the new method is slower so trim down the data to the area being shown before passing to cfp.con to speed it up. +Blockfill plots used to use the pcolormesh method but this had the advantage of being fast but gave incorrect results with masked data or when the data range wasn't extended in both 'min' and 'max' directions. The blockfill method now uses PolyCollection from matplotlib.collections to draw the polygons for each colour interval specified by the contour levels. This also has the advantage that blockfill is now available in other projections such as polar stereographic. When doing blockfill plots of larger numbers of points the new method is slower so trim down the data to the area being shown before passing to cfp.con to speed it up. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Making postscript or PNG pictures +Making postscript or PNG pictures ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There are various methods of producing a figure for use in an external package such as a web document or LaTeX, Word etc. @@ -1428,7 +1428,7 @@ The first two lines of the Python script enable cf-plot to run without requiring Changing defaults via the ~/.cfplot_defaults file ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -A ~/.cfplot_defaults default overide file in the user home directory may contain three +A ~/.cfplot_defaults default overide file in the user home directory may contain three values affecting contour plots initially. Please contact andy.heaps@ncas.ac.uk if you would like any more defaults changed in this manner. | blockfill True @@ -1436,7 +1436,7 @@ values affecting contour plots initially. Please contact andy.heaps@ncas.ac.uk i | lines False This changes the default cfplot con options from contour fill with contour lines -on top to blockfill with no contour lines on top. The blockfill, fill and line +on top to blockfill with no contour lines on top. The blockfill, fill and line options to the con routine override any of these preset values. The delimter beween the option and the value must be a space. @@ -1459,7 +1459,7 @@ When plotting data with different time units users need to move their data to us | **data1.construct('T').Units** | -This is because when making a contour or line plot the axes are defined in terms of a linear scale of numbers. Having two +This is because when making a contour or line plot the axes are defined in terms of a linear scale of numbers. Having two different linear scales breaks the connection between the data. @@ -1469,7 +1469,7 @@ Blockfill contour plots with a time mean ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When plotting a blockfill contour plot of data with a time mean the plot can sometimes produce unexpected results. -For example the following data has monthly data points but bounds of ten years for each point. +For example the following data has monthly data points but bounds of ten years for each point. | **f.coord('T').dtarray** @@ -1524,7 +1524,7 @@ Reading in data and field selection | **fl = cf.read('cfplot_data/ggap.nc')** -f is now an list of 4 fields. The list is indicated by the square brackets surrounding the fields. +f is now an list of 4 fields. The list is indicated by the square brackets surrounding the fields. | **fl** @@ -1538,7 +1538,7 @@ In Python the number of the field starts at zero so to select the temperature we | **g = fl[0]** -We could also have used +We could also have used | **g = fl.select('air_temperature')[0]** @@ -1673,7 +1673,7 @@ To do a time mean of the data -This now has one time value placed in the middle of the original time series. +This now has one time value placed in the middle of the original time series. | **h.coord('T').dtarray** | array([cftime.Datetime360Day(1930, 1, 1, 0, 0, 0, 0, 1, 1)], dtype=object) @@ -1720,7 +1720,7 @@ cf-plot can also make contour and vector plots by passing data arrays. In this e .. image:: images/guide5.png - :scale: 52% + :scale: 52% The contouring routine doesn't know that the data passed is a map plot as the only information passed is data arrays. i.e. there is no metadata available to help cf-plot to know what type of plot is required. The plot type can be explicitly set in this case with the **ptype** flag to **cfp.con**. @@ -1730,7 +1730,7 @@ The contouring routine doesn't know that the data passed is a map plot as the on cfp.con(f=temp, x=lons, y=lats, ptype=1) .. image:: images/guide6.png - :scale: 52% + :scale: 52% Other types of plot are: @@ -1750,7 +1750,7 @@ In the next example the atmosphere is upside down as cf-plot will plot data axes :: - + import cfplot as cfp import numpy as np from netCDF4 import Dataset as ncfile @@ -1762,7 +1762,7 @@ In the next example the atmosphere is upside down as cf-plot will plot data axes cfp.con(f=u_mean, x=lats, y=pressure) .. image:: images/guide7.png - :scale: 52% + :scale: 52% Adding **ptype=4** to the **cfp.con** allows cf-plot to recognise the data as having a pressure axis and plots the atmosphere the right way up. @@ -1772,7 +1772,7 @@ Adding **ptype=4** to the **cfp.con** allows cf-plot to recognise the data as ha cfp.con(f=u_mean, x=lats, y=pressure, ptype=4) .. image:: images/guide8.png - :scale: 52% + :scale: 52% @@ -1801,10 +1801,10 @@ Pacific you could use | **mapset(lonmin=-270, lonmax=-60, latmin=-30, latmax=30)** Note that Cartopy forces the restriction that in the cyclindrical -equidistant projection a degrees of longitude has the same size as a +equidistant projection a degrees of longitude has the same size as a degree of latitude. -The **proj** parameter accepts **'npstere'** and **'spstere'** for northern +The **proj** parameter accepts **'npstere'** and **'spstere'** for northern hemisphere or southern hemisphere polar stereographic projections. In addition to these the **boundinglat** parameter sets the edge of the viewable latitudes and **lat_0** sets the centre of desired map domain. @@ -1815,7 +1815,7 @@ Additional map projections via proj are: **ortho**, **merc**, **moll**, **robin* .. image:: images/fig31.png - :scale: 52% + :scale: 52% :: @@ -1826,8 +1826,8 @@ Additional map projections via proj are: **ortho**, **merc**, **moll**, **robin* cfp.levs(-3, 7, 0.5) cfp.con(f, lines=False) -| -| +| +| cf-plot looks for auxiliary coordinates of longitude and latitude and uses them if found. If they aren't present then cf-plot will generate the grid required using the **projection_x_coordinate** and **projection_y_coordinate** variables within the netCDF data file. For a blockfill plot as below it uses the latter method and the supplied bounds. @@ -1850,7 +1850,7 @@ New **cfp.setvars** options affecting the grid plotting for the UKCP grid are: Here we change the plotted grid with **grid_lons** and **grid_lats** options to **cfp.setvars** and make a blockfill plot. .. image:: images/fig32.png - :scale: 52% + :scale: 52% :: @@ -1863,13 +1863,13 @@ Here we change the plotted grid with **grid_lons** and **grid_lats** options to cfp.setvars(grid_lons=np.arange(14)-11, grid_lats=np.arange(13)+49) cfp.con(f, lines=False, blockfill=True) -| -| +| +| .. image:: images/fig33.png - :scale: 52% + :scale: 52% :: @@ -1885,13 +1885,13 @@ Here we change the plotted grid with **grid_lons** and **grid_lats** options to cfp.con(f, lines=False) cfp.gclose() -| -| +| +| .. image:: images/fig34.png - :scale: 52% + :scale: 52% Lambert conformal projections can now be cropped as in the following code: @@ -1906,14 +1906,14 @@ Lambert conformal projections can now be cropped as in the following code: -| -| +| +| .. image:: images/fig35.png - :scale: 52% + :scale: 52% :: @@ -1928,7 +1928,7 @@ Lambert conformal projections can now be cropped as in the following code: .. image:: images/fig36.png - :scale: 52% + :scale: 52% :: @@ -1939,13 +1939,13 @@ Lambert conformal projections can now be cropped as in the following code: cfp.mapset(proj='merc') cfp.con(f.subspace(time=15)) -| -| +| +| .. image:: images/fig37.png - :scale: 52% + :scale: 52% :: @@ -1958,13 +1958,13 @@ Lambert conformal projections can now be cropped as in the following code: -| -| +| +| .. image:: images/fig38.png - :scale: 52% + :scale: 52% :: @@ -1999,7 +1999,7 @@ For the list of `CF attributes -Next we put the numpy array of the data into a variable called data. In this example we add 20 to all values we insert this back +Next we put the numpy array of the data into a variable called data. In this example we add 20 to all values we insert this back into the field. Using this method it is easy to modify certain parts of the data to change while leaving the rest as it was. :: @@ -2072,7 +2072,7 @@ into the field. Using this method it is easy to modify certain parts of the dat f.data[:] = data -We could have just used the simpler notation of +We could have just used the simpler notation of :: @@ -2118,14 +2118,14 @@ Now we need to add 20 to the valid_min and valid_max: (-53.41583251953125, 136.50885009765625) -Now when the data is written out it is correct. +Now when the data is written out it is correct. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Example 3 - Data with an incorrect valid_min / valid_max ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Sometimes data has an invalid valid_min or valid_max due to a data creation mistake or processing error. +Sometimes data has an invalid valid_min or valid_max due to a data creation mistake or processing error. Here we make some sample data where the maximum of the data is greater than the valid_max parameter. @@ -2165,7 +2165,7 @@ On reading in the data again by default we get no warning that the data could be .. image:: images/data_incorrect1.png - :scale: 52% + :scale: 52% To turn on the warning in the **cf.read** command use **warn_valid=True** @@ -2194,11 +2194,4 @@ Now the data plots as we expect and we can change the data valid_min or valid_ma .. image:: images/data_incorrect2.png - :scale: 52% - - - - - - - + :scale: 52% diff --git a/docs/build/_sources/vectors.rst.txt b/docs/build/_sources/vectors.rst.txt index 0f7bfd4..b4a442c 100644 --- a/docs/build/_sources/vectors.rst.txt +++ b/docs/build/_sources/vectors.rst.txt @@ -9,7 +9,7 @@ Example 13 - vector plot ------------------------ .. image:: images/fig13.png - :scale: 44% + :scale: 44% :: @@ -23,11 +23,11 @@ Example 13 - vector plot -Example 14 - vector plot with colour contour map +Example 14 - vector plot with colour contour map ------------------------------------------------ .. image:: images/fig14.png - :scale: 44% + :scale: 44% :: @@ -46,7 +46,7 @@ Example 14 - vector plot with colour contour map cfp.gclose() -| +| In this plot we overlay a vector plot on a contoured temperature field. @@ -56,7 +56,7 @@ Example 15 - polar vector plot ------------------------------ .. image:: images/fig15.png - :scale: 44% + :scale: 44% Here we see the difference between plotting the vectors on the data grid and on a interpolated grid. The supplied grid gives a bullseye effect making the wind direction difficult to see near the pole. @@ -87,7 +87,7 @@ Example 16 - zonal vector plot ------------------------------ .. image:: images/fig16.png - :scale: 44% + :scale: 44% :: @@ -96,10 +96,10 @@ Example 16 - zonal vector plot c=cf.read('cfplot_data/vaAMIPlcd_DJF.nc')[0] c=c.subspace(Y=cf.wi(-60,60)) - c=c.subspace(X=cf.wi(80,160)) + c=c.subspace(X=cf.wi(80,160)) c=c.collapse('T: mean X: mean') - g=cf.read('cfplot_data/wapAMIPlcd_DJF.nc')[0] + g=cf.read('cfplot_data/wapAMIPlcd_DJF.nc')[0] g=g.subspace(Y=cf.wi(-60,60)) g=g.subspace(X=cf.wi(80,160)) g=g.collapse('T: mean X: mean') @@ -113,7 +113,7 @@ Here we make a zonal mean vector plot with different vector keys and scaling fac Example 16b - stream plot - basic --------------------------------- -A streamplot is used to show fluid flow and 2D field gradients. In this first example the data goes from 0 to 358.875 in longitude. The cartopy / matplotlib interface seems to need the data to be inside the data window in longitude so we anchor the data in cf-python using the anchor method to start at -180 in longitude. If we didn't do this any longitudes less than zero would have no streams drawn. +A streamplot is used to show fluid flow and 2D field gradients. In this first example the data goes from 0 to 358.875 in longitude. The cartopy / matplotlib interface seems to need the data to be inside the data window in longitude so we anchor the data in cf-python using the anchor method to start at -180 in longitude. If we didn't do this any longitudes less than zero would have no streams drawn. :: @@ -127,12 +127,12 @@ A streamplot is used to show fluid flow and 2D field gradients. In this first e u = u.anchor('X', -180) v = v.anchor('X', -180) - + cfp.stream(u=u, v=v, density=2) .. image:: images/fig16b.png - :scale: 44% + :scale: 44% Example 16c - stream plot - enhanced @@ -147,7 +147,7 @@ In the second streamplot example a colorbar showing the intensity of the wind is mag = np.squeeze(magnitude.array) cfp.levs(0, 60, 5, extend='max') - cfp.cscale('viridis', ncols=13) + cfp.cscale('viridis', ncols=13) cfp.gopen() cfp.stream(u=u, v=v, density=2, color=mag) cfp.cbar(levs=cfp.plotvars.levels, position=[0.12, 0.12, 0.8, 0.02], title='Wind magnitude') @@ -155,5 +155,4 @@ In the second streamplot example a colorbar showing the intensity of the wind is .. image:: images/fig16c.png - :scale: 44% - + :scale: 44% diff --git a/docs/build/_sources/version_1.3.rst.txt b/docs/build/_sources/version_1.3.rst.txt index 70b36f9..0cff157 100644 --- a/docs/build/_sources/version_1.3.rst.txt +++ b/docs/build/_sources/version_1.3.rst.txt @@ -13,7 +13,7 @@ More information is needed on the changes made between versions. This is useful :: Changes made for new releases in the versions page from 1.3 forward have their own web page - referenced from the versions page. + referenced from the versions page. @@ -33,10 +33,10 @@ Work out which of the source __init__.py are used for version information and de ============================== :: - + In cf-python the isbounded method was renamed to hasbounds. Changed code to use the new method. - + 4. gvals bug ============ @@ -50,7 +50,7 @@ gives The result shouldn't have a value below 32400 and should start at 32400. -:: +:: Modified gvals routine to not change the step if mod is set to 0. @@ -59,9 +59,9 @@ The result shouldn't have a value below 32400 and should start at 32400. 5. Example 7 x-axis is labelled as degrees_north ================================================ -The various CF latitude names should be caught and the returned as 'latitude' +The various CF latitude names should be caught and the returned as 'latitude' -:: +:: Fixed. @@ -70,8 +70,8 @@ The various CF latitude names should be caught and the returned as 'latitude' 6. Plot limits bug ================== -When plots is made with no user call to gset a zonal mean plot followed by a map plot -gives previous plot limits. A call of gset() is needed before the call to gclose +When plots is made with no user call to gset a zonal mean plot followed by a map plot +gives previous plot limits. A call of gset() is needed before the call to gclose in con and vect routines. :: @@ -95,7 +95,7 @@ This prevents the cfplot.py program from being used as a stand-alone program. 8. Revamp colour scales page to use consistent set of images ============================================================ -The colour scales page had a set of scale images from a variety of sources. +The colour scales page had a set of scale images from a variety of sources. :: @@ -116,7 +116,7 @@ The colour scales page had a set of scale images from a variety of sources. 10. Add in code to get verbose messages ======================================= -It is useful for debugging to see what cf-plot is doing as it progresses with making a +It is useful for debugging to see what cf-plot is doing as it progresses with making a plot. Calling the con routine with verbose=1 gives some basic messages about the progress. Of greater interest might be the output of the call from con to cf_data_assign. The cf_data_assign function verbose option lets the user know which parts of CF are being used to @@ -147,7 +147,7 @@ Check cf-plot works in batch mode and modify if not. :: - A display check is now made in the cf-plot code and if none is present then the Agg backing + A display check is now made in the cf-plot code and if none is present then the Agg backing store is used. The following configuration works on the Reading Met department Linux system. Need to check why @@ -172,7 +172,7 @@ Check cf-plot works in batch mode and modify if not. =============================================================== :: - + Fixed - need to have the cf-plot reference in the line .. autofunction:: cf-plot.process_color_scales @@ -185,7 +185,7 @@ Check cf-plot works in batch mode and modify if not. Done -15. Data input documentation section needs revising +15. Data input documentation section needs revising =================================================== The cf_data_assign code rewrite has made the data input documentation out of date. @@ -211,9 +211,3 @@ Rearrange the order of the gallery plots to make the major plot types more promi :: Fixed - - - - - - diff --git a/docs/build/_sources/version_1.5.rst.txt b/docs/build/_sources/version_1.5.rst.txt index f3e2725..7eded23 100644 --- a/docs/build/_sources/version_1.5.rst.txt +++ b/docs/build/_sources/version_1.5.rst.txt @@ -13,9 +13,9 @@ This is a rolling bug/feature fix version. The colorbar can sometimes be mislabelled when using unusual manual labels. -cfp.levs(manual=[-1, 1, 10000, 20000, 30000, 40000, 50000, 60000]) +cfp.levs(manual=[-1, 1, 10000, 20000, 30000, 40000, 50000, 60000]) will give the correct contour lines and labels but incorrect colorbar labels. The color bar labels will -be 0, 2, 10001, 20001, 30001, 40001, 50001, 60001 and a +1 will appear next to the color bar label. +be 0, 2, 10001, 20001, 30001, 40001, 50001, 60001 and a +1 will appear next to the color bar label. It looks like this is an intentional behaviour of the code for colorbar and is correct but not what is required. The cf-plot code was changed to substitute the correct colorbar labels for the ones that colorbar thinks it should use. @@ -59,7 +59,7 @@ The default cylindirical projection limits of -180 to 180 in longitude and -90 t 5. Automatic colour scales bug ============================== -Automatic colour scales are broken. Remove call to cscale() in gpos. +Automatic colour scales are broken. Remove call to cscale() in gpos. :: @@ -70,7 +70,7 @@ Automatic colour scales are broken. Remove call to cscale() in gpos. 6. Colorbar labels overwrite each other ======================================= -Colour bar labels overwite each other when large number of contour levels are used or when more plot columns are used. Include code to take account of these based on the total number of characters in the contour labels and the number of +Colour bar labels overwite each other when large number of contour levels are used or when more plot columns are used. Include code to take account of these based on the total number of characters in the contour labels and the number of columns. If the user hasn't supplied a value for colorbar_label_skip to the con routine then the calculated value is used. The labels used will start at the lowest for a continuous data set and from zero for a diverging one. @@ -178,14 +178,9 @@ Options are: 14. Reduced longitude grid not plotted correctly ================================================ -A reduced longitude grid isn't plotted correctly due to a bug in +A reduced longitude grid isn't plotted correctly due to a bug in the calculation of the lonrange variable. :: Fixed - - - - - diff --git a/docs/build/_sources/version_1.6.rst.txt b/docs/build/_sources/version_1.6.rst.txt index 47383cd..4ce139f 100644 --- a/docs/build/_sources/version_1.6.rst.txt +++ b/docs/build/_sources/version_1.6.rst.txt @@ -8,10 +8,9 @@ version 1.6 changes Rotated grid plotting and additional features. -1. Rotated grid plotting +1. Rotated grid plotting ======================== :: Introduced - diff --git a/docs/build/_sources/version_1.7.rst.txt b/docs/build/_sources/version_1.7.rst.txt index de15905..24c0cbc 100644 --- a/docs/build/_sources/version_1.7.rst.txt +++ b/docs/build/_sources/version_1.7.rst.txt @@ -57,7 +57,7 @@ In the bfill routine levs=clevs.astype(float) was changed to levs=np.array(clevs :: Fixed - + 7. No change ============ @@ -124,11 +124,11 @@ Make viridis the default sequential colour scale. -13. con update - allow default expansion of colour scales to fit the contour levels +13. con update - allow default expansion of colour scales to fit the contour levels =================================================================================== -When setting a different colour scale cf-plot now automatically matches colour table to +When setting a different colour scale cf-plot now automatically matches colour table to the contour levels. @@ -138,14 +138,14 @@ the contour levels. -14. con update - numpy warning when having a zero contour +14. con update - numpy warning when having a zero contour ========================================================= -Having a zero contour in the levels caused a numpy warning when doing a contour map. The +Having a zero contour in the levels caused a numpy warning when doing a contour map. The numpy warning level was reduced in the con routine so this warning isn't shown. This may be removed in a future version of cf-plot as it looks like the numpy warning isn't there in -later versions of numpy. +later versions of numpy. :: @@ -157,8 +157,8 @@ later versions of numpy. =========================================================== -The cf-plot documentation was chaged to reflect the adoption of viridis as the new sequential -data colour map. Other examples were also changed to show the new magma, inferno, plasma, +The cf-plot documentation was chaged to reflect the adoption of viridis as the new sequential +data colour map. Other examples were also changed to show the new magma, inferno, plasma, parula and gray colour scales. @@ -168,11 +168,11 @@ parula and gray colour scales. -16. Missing field name on PP data +16. Missing field name on PP data ================================= -With PP data that has no standard_name, long_name or short_name the field name is blank. The field naming scheme was changed to use the cf-python method field.name('No Name') setting the field name to 'No Name' as a catch all. +With PP data that has no standard_name, long_name or short_name the field name is blank. The field naming scheme was changed to use the cf-python method field.name('No Name') setting the field name to 'No Name' as a catch all. :: @@ -235,12 +235,3 @@ vect to be modified to take addition values so that EP flux vector etc plots are :: Done - see example 15 - - - - - - - - - diff --git a/docs/build/_sources/version_1.9.rst.txt b/docs/build/_sources/version_1.9.rst.txt index dfd838d..0ed481b 100644 --- a/docs/build/_sources/version_1.9.rst.txt +++ b/docs/build/_sources/version_1.9.rst.txt @@ -53,7 +53,7 @@ Package renamed to cf-plot to fit in with cf-python and cf-view. 5. Change web docs to github ============================ -Web documents location changed to http://ajheaps.github.io/cf-plot. setup.py etc references changed accordingly. +Web documents location changed to http://ajheaps.github.io/cf-plot. setup.py etc references changed accordingly. :: @@ -80,7 +80,7 @@ Add options so that passing of non-CF data to lineplot works. Done -8. vect - turn off vector key +8. vect - turn off vector key ============================= Add show_key option to vect to allow turning off of vector key. @@ -128,8 +128,8 @@ Add plot.close() to gclose routine to properly close each plot when it is finish 12. levs - change in floating point levels calculation ====================================================== -Floating point levels were calculated using numpy.arange and this can sometimes give stange contour levels. -For example, +Floating point levels were calculated using numpy.arange and this can sometimes give stange contour levels. +For example, | | np.arange(-0.2,0.2,0.04) @@ -139,7 +139,7 @@ For example, | 1.60000000e-01]) -Using np.linspace(-0.2,0.2,11) gives a much neater set of levels and the floating point calculation of levels was changed +Using np.linspace(-0.2,0.2,11) gives a much neater set of levels and the floating point calculation of levels was changed to adopt this method. :: @@ -248,9 +248,9 @@ One of the colour scales had an incorrect extension and this caused an issue in 22. Plot blocking resolved ========================== -If the display command from ImageMagick is available this is now used in conjunction with subprocess -in preference to build-in Matplotlib viewer. This gets around the problem of a plot blocking the command prompt -preventing further plots from being made. Using cfp.setvars(viewer='matplotlib') will revert to using the +If the display command from ImageMagick is available this is now used in conjunction with subprocess +in preference to build-in Matplotlib viewer. This gets around the problem of a plot blocking the command prompt +preventing further plots from being made. Using cfp.setvars(viewer='matplotlib') will revert to using the built-in matplotlib picture viewer. @@ -354,8 +354,8 @@ not to pass f but to have x=x and y=y. This allows x vs y plots and y vs x plot 30. con - filled contours and irregular contour levels ====================================================== -Selecting irregular contour levels with cfp.levs(manual=manual) and filled contours gives a slight -colour scale mismatch. This was resolved by calculating a normalization array: +Selecting irregular contour levels with cfp.levs(manual=manual) and filled contours gives a slight +colour scale mismatch. This was resolved by calculating a normalization array: plotvars.norm=matplotlib.colors.BoundaryNorm(boundaries=plotvars.levels, ncolors=ncolors) :: @@ -415,16 +415,12 @@ levs = (((np.arange(min, max+step*1e-10, step, dtype=np.float64)*1e10)).astype(n gvals changed to use more sensible steps when step >= 1. -steps are now 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 25000, 50000, 100000, +steps are now 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, 5000, 10000, 20000, 25000, 50000, 100000, 200000, 250000, 500000, 1000000. - + If the number of steps from the above in (data max - data min) is greater than 12 then this step is used. :: Changed - - - - diff --git a/docs/build/_sources/version_2.1.rst.txt b/docs/build/_sources/version_2.1.rst.txt index 71f3e26..3cb5ba1 100644 --- a/docs/build/_sources/version_2.1.rst.txt +++ b/docs/build/_sources/version_2.1.rst.txt @@ -33,14 +33,14 @@ Missing longitude and latitude labels were added to rotated pole plots. 3. cscale - uniform keyword added ================================= -When a divergent colour scheme is used such as in example 4 in the gallery the default colour scale is stretched -so that blues are below zero and reds above zero. When the number of colours above and below differ quite markedly +When a divergent colour scheme is used such as in example 4 in the gallery the default colour scale is stretched +so that blues are below zero and reds above zero. When the number of colours above and below differ quite markedly this can give undue emphasis to data by having too strong colours in the above or below zero scale. A new keyword was -introduced, uniform=True (or False), to address this issue. The default is now uniform=True for divergent data +introduced, uniform=True (or False), to address this issue. The default is now uniform=True for divergent data contour plots where no user colour scale has been defined: .. image:: images/scale1_new.png - :scale: 52% + :scale: 52% Use: @@ -62,7 +62,7 @@ to revert to the previous behaviour. 4. mapset - new projections added ================================= -Added Mercator, Lambert Conformal, Orthographic and Robinson projections. See the Basemap documentation +Added Mercator, Lambert Conformal, Orthographic and Robinson projections. See the Basemap documentation at http://matplotlib.org/basemap/users/mapsetup.html for calling parameters. :: @@ -94,7 +94,7 @@ Lambert conformal projections can now be cropped as in the following code: .. image:: images/cm.png - :scale: 52% + :scale: 52% .. comment break to prevent indent below stopping image from rendering @@ -119,7 +119,7 @@ The CF metadata attribute of postitive for the Z coordinate is now used in the c 9. con - colors option for contour lines ======================================== -con - added colors keyword for the contour lines. This keyword takes a single colour or a list +con - added colors keyword for the contour lines. This keyword takes a single colour or a list of colours. The default is 'k' or black' :: @@ -130,8 +130,8 @@ of colours. The default is 'k' or black' 10. con - lines=True now the default ==================================== -Within con the lines=True parameter is now the default. This change was made due to the complex and -somewhat obscure logic in the blockfill section of code. The change will affect blockfill plots +Within con the lines=True parameter is now the default. This change was made due to the complex and +somewhat obscure logic in the blockfill section of code. The change will affect blockfill plots which were previously drawn with no lines using blockfill=True. The syntax for blockfill with no lines is now blockfill=True, lines=False. @@ -160,7 +160,7 @@ A new colour scale was added - brown to blue - BrBG. .. image:: images/colour_scales/BrBG.png - :scale: 52% + :scale: 52% .. comment break to prevent indent below stopping image from rendering @@ -197,7 +197,7 @@ Better yaxis labelling for hybrid height coordinates. 15. lineplot - check for a 'T' axis before accessing it ======================================================= -Check if a cf-field has a 'T' axis before trying to access it. +Check if a cf-field has a 'T' axis before trying to access it. :: @@ -208,7 +208,7 @@ Check if a cf-field has a 'T' axis before trying to access it. 16. lineplot - check xlabel is not None before accessing it =========================================================== -Check if xlabel is not None before trying to access it. +Check if xlabel is not None before trying to access it. :: @@ -220,7 +220,7 @@ Check if xlabel is not None before trying to access it. 17. lineplot - Generate a more correct set of yticks if yrange < 1 ================================================================== -Generate a more correct set of yticks if yrange < 1. +Generate a more correct set of yticks if yrange < 1. :: @@ -326,7 +326,7 @@ cbar.set_ticklabels([str(i) for i in colorbar_labels]) 25. con - blockfill incorrect for very tight contour ranges =========================================================== -When the data range is very small the blockfill contour scheme miscalculated the upper bound for +When the data range is very small the blockfill contour scheme miscalculated the upper bound for the data. @@ -383,7 +383,7 @@ When plotting a CF field with a Z axis the data wasn't correctly plotted 30. con - blockfill rewritten ============================= -Blockfill plots in the con routine were rewitten to use PolyCollection from matplotlib.collections rather than +Blockfill plots in the con routine were rewitten to use PolyCollection from matplotlib.collections rather than pcolormesh. The new method allows better control of the various colorbar extension behaviour and data masking. It is slower for larger grids than pcolormesh but more accurate. @@ -396,7 +396,7 @@ It is slower for larger grids than pcolormesh but more accurate. 31. con - blockfill for map plots other than cylindrical projection =================================================================== -Blockfill for map plots other than the cylindrical projection was implemented. Trim the data to the required +Blockfill for map plots other than the cylindrical projection was implemented. Trim the data to the required map limits to avoid them being plotted. @@ -405,7 +405,7 @@ map limits to avoid them being plotted. Done -32. axes - user defined axes +32. axes - user defined axes ============================ Axes defined with the axes command should feed through to con, vect and lineplot. The priority order of axis @@ -423,7 +423,7 @@ labeling in order of preference is: 33. con - ability to swap axes for hovmuller plots ================================================== -In Hovmuller plots sometimes the axes are show as time vs longitude or latitude. The swap_axes keyword +In Hovmuller plots sometimes the axes are show as time vs longitude or latitude. The swap_axes keyword was added to con to facilitate this. @@ -433,7 +433,7 @@ was added to con to facilitate this. 34. con - blockfill produces an error for bounded data in Hovmuller plots -========================================================================= +========================================================================= The data bounds passed for Hovmuller blockfill plots were incorrect. @@ -461,7 +461,7 @@ The cfp.setvars(viewer=None) is no longer required in the jupyter notebook sessi 36. stipple - now works in Y-Z and X-Z plots ============================================ -Stippling now works in Y-Z and X-Z plots. +Stippling now works in Y-Z and X-Z plots. :: @@ -546,7 +546,7 @@ a set number of colours this matches the number of levels that are being contour 43. lineplot - wrong time axis annotation plotted ================================================= -In lineplot an incorrect generic time axis annotation wass plotted. This was corrected to time, time(years), +In lineplot an incorrect generic time axis annotation wass plotted. This was corrected to time, time(years), time(months) etc. @@ -582,7 +582,7 @@ are generated internally on a basis of 0 to number of axis points -1. 46. con and stipple transparency ================================ -con and stipple now have an alpha keyword indicating the tranparency for the plot. The default is set to +con and stipple now have an alpha keyword indicating the tranparency for the plot. The default is set to 1 giving no transparency. :: @@ -592,7 +592,7 @@ con and stipple now have an alpha keyword indicating the tranparency for the plo 47. con - contour line thickness ================================ -Contour line thickness can now be set using the linewidths parameter to con. One value gives the same +Contour line thickness can now be set using the linewidths parameter to con. One value gives the same thickness for all lines. Multiple values are also accepted. :: @@ -620,20 +620,20 @@ A dpi setting for setvars and gopen now allows the dots per inch to be set for P 50. vect - vector annotation fontsize ===================================== -Vector annotation now uses the internal plotvars.axis_label_fontsize variable for the -text size. This is set in the setvars routine. This allows multiple vector plots on a page to +Vector annotation now uses the internal plotvars.axis_label_fontsize variable for the +text size. This is set in the setvars routine. This allows multiple vector plots on a page to be scaled correctly in terms of their text size. :: Done - + 51. gset docstring documentation gave incorrect date string order ================================================================= -The gset docstring documentation gave incorrect date string order and this has now been +The gset docstring documentation gave incorrect date string order and this has now been corrected. @@ -646,7 +646,7 @@ corrected. 52. gvals modification ====================== -The gvals code which generates sensible values for labelling contours and axes was changed +The gvals code which generates sensible values for labelling contours and axes was changed to produce reasonable levels between -1.0 and 0.1. :: @@ -658,7 +658,7 @@ to produce reasonable levels between -1.0 and 0.1. 53. levs - allow only step to generate contour levels ===================================================== -Code was added to the levs and con routines to allow step to generate the levels for the contour field without having to +Code was added to the levs and con routines to allow step to generate the levels for the contour field without having to specify the min and max for the levels genration. @@ -671,7 +671,7 @@ specify the min and max for the levels genration. 54. con - blockfill transparency ================================ -Added alpha transparency to the blockfill contour routine. To call this add the blockfill=True and +Added alpha transparency to the blockfill contour routine. To call this add the blockfill=True and alpha=alpha keywords to the cfp.con command. :: @@ -730,7 +730,7 @@ This was reported to the Basemap authors and a fix put into cf-plot so that all When passing reduced data for a map contour plot only the longitude range was checked. This has been corrected so that the latitude range is also checked. - + :: Fixed @@ -757,10 +757,10 @@ routine. This makes it eaier to maintain the code base. Added new functionality to the colorbar in con: -| colorbar_text_up_down=False - on a horizontal colorbar alternate the -| labels top and bottom starting in the up position -| colorbar_text_down_up=False - on a horizontal colorbar alternate the -| labels bottom and top starting in the bottom position +| colorbar_text_up_down=False - on a horizontal colorbar alternate the +| labels top and bottom starting in the up position +| colorbar_text_down_up=False - on a horizontal colorbar alternate the +| labels bottom and top starting in the bottom position | colorbar_drawedges=True - draw internal delimeter lines in the colorbar @@ -786,7 +786,7 @@ data. 63. Introduced a ~/.cfplot_defaults file ======================================== -A ~/.cfplot_defaults default overide file in the user home directory may contain three +A ~/.cfplot_defaults default overide file in the user home directory may contain three values initially. Please contact me if you would like any more defaults changed in this manner. | blockfill True @@ -794,7 +794,7 @@ values initially. Please contact me if you would like any more defaults changed | lines False This changes the default cfplot con options from contour fill with contour lines -on top to blockfill with no contour lines on top. The blockfill, fill and line +on top to blockfill with no contour lines on top. The blockfill, fill and line options to the con routine override any of these preset values. The delimter beween the option and the value must be a space. @@ -824,7 +824,7 @@ colour. ========================================================== It wasn't possible to change the polar stereographic longitude label fontsize or fontweight. -This is now done using the setvars routine and changing the axis_label_fontsize and +This is now done using the setvars routine and changing the axis_label_fontsize and axis_label_fontweight values. @@ -837,7 +837,7 @@ axis_label_fontweight values. 66. lineplot - twinx or twiny axes =================================== -It is now possible to do twinx or twiny plots in lineplot. See example 30 in +It is now possible to do twinx or twiny plots in lineplot. See example 30 in :ref:`graphs` :: @@ -848,7 +848,7 @@ It is now possible to do twinx or twiny plots in lineplot. See example 30 in 67. vect - polar vectors on original grid ========================================= -It is now possible to plot polar vectors on the original grid as in example 15 in +It is now possible to plot polar vectors on the original grid as in example 15 in :ref:`vector` :: @@ -859,7 +859,7 @@ It is now possible to plot polar vectors on the original grid as in example 15 i 68. con - linestyles keyword added ================================== -The linestyles keyword was added to the con routine to allow user selection of linestyle. +The linestyles keyword was added to the con routine to allow user selection of linestyle. Value should be one of 'solid', 'dashed', 'dashdot' or 'dotted' @@ -899,7 +899,7 @@ A bug in the specification of user time axes in lineplot caused the user time ax 71. con - user defined time vs height / pressure axes ===================================================== -A bug in the specification of user defined time axes in time vs height / pressure plots caused the +A bug in the specification of user defined time axes in time vs height / pressure plots caused the user time axis to be ignored. @@ -913,7 +913,7 @@ user time axis to be ignored. =============================================================================== The user user specification of xlabel and xunits and ylabel and yunits was not properly implemented incorrect -axis labels were produced. +axis labels were produced. :: @@ -925,7 +925,7 @@ axis labels were produced. ======================================== Some new keywords were added to setvars that affect the plotting of rotated pole grid labelling. - + | rotated_grid_spacing=10 - rotated grid spacing in degrees | rotated_deg_spacing=0.75 - rotated grid spacing between graticule dots | rotated_continents=True - draw rotated continents @@ -969,7 +969,7 @@ The rotated pole grid was not drawn in numpy 1.13. 76. con - cylindrical projection xlabel and ylabel doesn't use user defined fontsize ==================================================================================== -The cylindrical projection contour xlabel and ylabel doesn't use user defined fontsize defined +The cylindrical projection contour xlabel and ylabel doesn't use user defined fontsize defined with cfp.setvars(axis_label_fontsize=22) for example. :: @@ -988,7 +988,3 @@ changed and will plot the map to match the input vectr area unless any map setti :: Fixed - - - - diff --git a/docs/build/_sources/version_2.2.rst.txt b/docs/build/_sources/version_2.2.rst.txt index 57527cd..f75eb36 100644 --- a/docs/build/_sources/version_2.2.rst.txt +++ b/docs/build/_sources/version_2.2.rst.txt @@ -77,7 +77,7 @@ cfp.setvars(legend_frame=False) colorbar font properties can now be set using the setvars routine: -cfp.setvars(colorbar_fontsize=11) +cfp.setvars(colorbar_fontsize=11) cfp.setvars(colorbar_fontweight='normal') @@ -107,7 +107,7 @@ Two new marker properties have been introduced to the lineplot routine. The default of having a frame around the legend can now be turned off with: -cfp.setvars(legend_frame=False) +cfp.setvars(legend_frame=False) Legend frame face and edge colors can be set with: @@ -127,8 +127,8 @@ cfp.setvars(legend_frame_edge_color='blue') 8. axes - degree symbol option for longitude and latitude labelling =================================================================== -The default labelling for longitude and latitude axes is 90E, 30N etc. -If a degree symbol is required this can be made the default for all subsequent +The default labelling for longitude and latitude axes is 90E, 30N etc. +If a degree symbol is required this can be made the default for all subsequent plots with: cfp.setvars(degsym=True) @@ -137,7 +137,7 @@ Users can also add this option to the ~/.cfplot_defaults file as degsym True - + The degree symbol is '$\degree$' as a string for any further plot customisation. :: @@ -149,7 +149,7 @@ The degree symbol is '$\degree$' as a string for any further plot customisation. 9. rgrot, rgunrot - removed rotated axis routines ================================================= -The rgrot and rgunrot routines are no longer needed and have been replaced +The rgrot and rgunrot routines are no longer needed and have been replaced by using the Cartopy ccrs.RotatedPole transform. @@ -164,7 +164,7 @@ by using the Cartopy ccrs.RotatedPole transform. The crop limits used in Cartopy / Matplotlib for polarstereographic and lcc -projections are slightly wrong. These were fixed by recalculating the limits +projections are slightly wrong. These were fixed by recalculating the limits and setting them with set_xlim and set_ylim within the plot_map_axes routine. @@ -232,8 +232,8 @@ of the drawn axes around the plot. 15. cf-data-assign - rotated pole axis specification bug ======================================================== -A bug appears in the internal routine cf-data_assign for rotated pole plots when both -the X and Y axes have the same number of points. The cf_data_assign routine was modified to +A bug appears in the internal routine cf-data_assign for rotated pole plots when both +the X and Y axes have the same number of points. The cf_data_assign routine was modified to properly assign grid_longitude and grid_latitude. @@ -275,8 +275,3 @@ In lineplot if no axis labels are provided then the axis labels were copied from :: Fixed - - - - - diff --git a/docs/build/_sources/version_2.3.rst.txt b/docs/build/_sources/version_2.3.rst.txt index 32d5e22..5cff835 100644 --- a/docs/build/_sources/version_2.3.rst.txt +++ b/docs/build/_sources/version_2.3.rst.txt @@ -12,7 +12,7 @@ UKCP grid plotting Support has been added for the UKCP grid which is an instance of the tranveverse mercator projection. -cfp.mapset(proj='UKCP') will give a transverse mercator projection with the limts of lonmin = -11, +cfp.mapset(proj='UKCP') will give a transverse mercator projection with the limts of lonmin = -11, lonmax = 3, latmin = 49 and latmax = 61. Some examples of this and other pavailable projections have been added at :ref:`projections` @@ -92,18 +92,3 @@ incorrect. :: Fixed - - - - - - - - - - - - - - - diff --git a/docs/build/_sources/version_2.4.rst.txt b/docs/build/_sources/version_2.4.rst.txt index a35c572..f74a263 100644 --- a/docs/build/_sources/version_2.4.rst.txt +++ b/docs/build/_sources/version_2.4.rst.txt @@ -24,7 +24,7 @@ Support added for plotting trajectories in contiguous ragged array format. 1. zorder option added to plotting commands =========================================== -The plotting order parameter, zorder, has been added to con, vect, stipple and lineplot. Using +The plotting order parameter, zorder, has been added to con, vect, stipple and lineplot. Using zorder with a larger number puts the plotted item on top of an item with a lower zorder number. @@ -110,7 +110,7 @@ Contour plots of latitude or longitude vs model level number weren't proper labe 8. con - polar plot labels ========================== -If a polar plot is made and the axis_label_fontsize is set to zero then the longitide labels are no longer +If a polar plot is made and the axis_label_fontsize is set to zero then the longitide labels are no longer plotted. Previously they were plotted but still appeared on the plot wven though they had zero size. @@ -122,22 +122,11 @@ plotted. Previously they were plotted but still appeared on the plot wven thoug 9. con - Rotated pole data change ================================= -Contour plots using rotated pole data - if the longitudes and latitudes for each point are supplied as 2D arrays -in auxiliary coordinates then these are now used for making a contour plot. Previously the rotated pole coordinate +Contour plots using rotated pole data - if the longitudes and latitudes for each point are supplied as 2D arrays +in auxiliary coordinates then these are now used for making a contour plot. Previously the rotated pole coordinate system was used to generate the longitudes and latitudes for the contour plot. :: Changed - - - - - - - - - - - diff --git a/docs/build/_sources/version_3.0.rst.txt b/docs/build/_sources/version_3.0.rst.txt index 6d1e6a7..d08f250 100644 --- a/docs/build/_sources/version_3.0.rst.txt +++ b/docs/build/_sources/version_3.0.rst.txt @@ -10,7 +10,7 @@ Change code to use Python 3 and cf-python 3. 0. Change code to use Python 3 and cf-python 3 ============================================== -cf-plot code was changed to use Python 3 and cf-python 3. Support for Python 2.7 and cf-python2.x was dropped. +cf-plot code was changed to use Python 3 and cf-python 3. Support for Python 2.7 and cf-python2.x was dropped. :: @@ -63,7 +63,7 @@ A missing initial definition of ncvar in the cf_var_name routine was fixed. The grid_lons and grid_lats options used in cfp.setvars have been removed. The grid drawing options for UKCP grids are now controlled by xticks, yticks and xaxis, yaxis as in other plots. -The polar stereographic grid now takes the line colour, line width and line style from grid_colour, grid_linestyle and grid_thickness +The polar stereographic grid now takes the line colour, line width and line style from grid_colour, grid_linestyle and grid_thickness that are set in cfp.setvars. :: @@ -87,7 +87,7 @@ A bug in the blockfill code logic meant that some data couldn't be plotted in bl 6. con - automatic levels sometimes have too many decimal places ================================================================ -The automatic contour level generation in con sometimes has too many decimal places. +The automatic contour level generation in con sometimes has too many decimal places. :: @@ -111,8 +111,8 @@ Missing dependencies for cf-python, scipy and cartopy were added to setup.py 8. Plot viewing with the Matplotlib interface ============================================= -Matplotlib can now be configured to allow non-blocking of the command prompt when a plot is -active. The cf-plot code has been changed allow the default plot viewer to be the Matplotlib +Matplotlib can now be configured to allow non-blocking of the command prompt when a plot is +active. The cf-plot code has been changed allow the default plot viewer to be the Matplotlib interface. Users can still use the previous Imagemagick display command by typing cfp.setvars(viewer='matplotlib') @@ -131,12 +131,12 @@ viewer matplotlib 9. mapset - aspect ratio in cylindrical projection plots ======================================================== -The default setting for cylindrical plots is for one degree of longitude to be the same size +The default setting for cylindrical plots is for one degree of longitude to be the same size as one degree of latitude. This can now be changed with the aspect option to mapset: | aspect = 'equal' - the default, 1 degree longitude is the same size as one degree of latitude | aspect = 'auto' - map fills the plot area -| aspect = number - a circle will be stretched such that the height is number times the width. +| aspect = number - a circle will be stretched such that the height is number times the width. | aspect = 1 is the same as aspect='equal'. @@ -162,7 +162,7 @@ An issue with a short time axis on a Hovmuller plot was found and fixed. 11. con - multiple plot spacing incorrect ========================================= -Fixed a variety of issues when using cfp.con and mutiple plots using the rows and columns +Fixed a variety of issues when using cfp.con and mutiple plots using the rows and columns spacing options to cfp.gopen. @@ -176,8 +176,8 @@ spacing options to cfp.gopen. =========================================== When adding an extra cyclic point in longitude and the data the cartopy_util.add_cyclic_point -routine sometimes fails when the data isn't quite regularly spaced. Generally this happends -when the numpy value for the data has a lot of decimal points. A numeric fix for this +routine sometimes fails when the data isn't quite regularly spaced. Generally this happends +when the numpy value for the data has a lot of decimal points. A numeric fix for this incorrect spacing was put in place. @@ -195,7 +195,7 @@ labels. A new internal routine called cfp.fix_floats addresses these issues. F from 0 to 5 in steps of 0.1 sometimes produced an axis of 0, 0.1, 0.2, 0.3, 0.3999999999999999, 0.5 which produced a badly fored axis. - + :: @@ -207,7 +207,7 @@ which produced a badly fored axis. ================================================================================== When plotting a blockfill contour plot of data with a time mean the plot can sometimes produce unexpected results. -For example the following data has monthly data points but bounds of ten years for each point. +For example the following data has monthly data points but bounds of ten years for each point. | **f.coord('T').dtarray** @@ -244,7 +244,7 @@ The new time data bounds are now monthly which is what is expected: :: Information added to user guide - + 15. con, vect and lineplot - input data checking @@ -384,8 +384,8 @@ CF fields that are passed for plotting are changed to 0 or 1 values. 25. cfp.lineplot - default line colours now taken from Matplotlib ================================================================= -The default cfp.lineplot colours are taken from Matplotlib unless specified by the user with -the color keyword. The previous default was for black which made lineplots more difficult to +The default cfp.lineplot colours are taken from Matplotlib unless specified by the user with +the color keyword. The previous default was for black which made lineplots more difficult to interpret. @@ -408,11 +408,11 @@ Streamplots are now available in cf-plot. Examples are in the user guide under | v=None - v wind | x=None - x locations of u and v | y=None - y locations of u and v -| density=None - controls the closeness of streamlines. When density = 1, +| density=None - controls the closeness of streamlines. When density = 1, | the domain is divided into a 30x30 grid -| linewidth=None - the width of the stream lines. With a 2D array the line width +| linewidth=None - the width of the stream lines. With a 2D array the line width | can be varied across the grid. The array must have the same shape as u and v -| color=None - the streamline color +| color=None - the streamline color | arrowsize=None - scaling factor for the arrow size | arrowstyle=None - arrow style specification | minlength=None - minimum length of streamline in axes coordinates @@ -439,7 +439,7 @@ inbetween plots and also generated a step of a float of 20.0 rather than the int 28. Code change to adhere to PEP8 ================================= -The cf-plot code base was changed to adhere to PEP8 with a 100 column line length. +The cf-plot code base was changed to adhere to PEP8 with a 100 column line length. :: @@ -497,7 +497,7 @@ the setvars command: **cfp.setvars(tight=True)** 33. lineplot - passing two CF fields for plotting doesn't plot the second line ============================================================================== -Passing two CF fields for plotting to lineplot only plotted the first line. This was intentional behaviour and now doing this causes an +Passing two CF fields for plotting to lineplot only plotted the first line. This was intentional behaviour and now doing this causes an error. The way to plot two lines is to open a graphics plot with cfp.gopen(), make two separate calls to cfp.lineplot and then close the graphics plot with cfp.gclose(). This is consistent with making multiple contour plots or a contour plot with overlaid vectors or stipples. :: @@ -519,7 +519,7 @@ When using lineplot with a constant value graph the automatic y-axis limits were 35. traj - spurious data points plotted ======================================= -When using masked trajectory data and the latest version of numpy spurious data points were sometimes plotted. +When using masked trajectory data and the latest version of numpy spurious data points were sometimes plotted. :: @@ -531,8 +531,8 @@ When using masked trajectory data and the latest version of numpy spurious data 36. con and setvars - changing contour level selection from linear to log, loglike or outlier ============================================================================================= -A new routine **cfp.calculate_levels** has been added to the cf-plot code to allow different -schemes for contour level selection. The default in cf-plot is that when the user hasn't made a +A new routine **cfp.calculate_levels** has been added to the cf-plot code to allow different +schemes for contour level selection. The default in cf-plot is that when the user hasn't made a specific level selection the contour levels will be spaced linearly between the minimum and maximum of the input data. @@ -580,20 +580,9 @@ The default behaviour of Matplotlib has changed such that if the data is all the 39. con - 2D data fails to plot in polar stereographic projection ================================================================= -Data associated with 2D longitude and 2D latitude arrays fails to plot in the polar stereographic projection. +Data associated with 2D longitude and 2D latitude arrays fails to plot in the polar stereographic projection. :: Fixed - - - - - - - - - - - diff --git a/docs/build/_sources/version_3.1.rst.txt b/docs/build/_sources/version_3.1.rst.txt index 010b3df..59824e2 100644 --- a/docs/build/_sources/version_3.1.rst.txt +++ b/docs/build/_sources/version_3.1.rst.txt @@ -21,7 +21,7 @@ Initial support for UGRID data was added. 1. Add titles option to cfp.con =============================== -A titles option was added to cfp.con. Setting this to True prints off a set of dimension +A titles option was added to cfp.con. Setting this to True prints off a set of dimension titles at the top of the plot. @@ -46,7 +46,7 @@ If a time axis has no calendar then this is now set to standard if none is prese 6. Various changes to update to cf-python 3.9.0 =============================================== -Various changes to setup.py and cf-plot were made to be compatible with cf-python 3.9.0. +Various changes to setup.py and cf-plot were made to be compatible with cf-python 3.9.0. :: @@ -55,7 +55,7 @@ Various changes to setup.py and cf-plot were made to be compatible with cf-pytho -7. cfp.lines, cfp.vect - added titles option +7. cfp.lines, cfp.vect - added titles option ============================================ The titles option to display the field dimension and cell methods selections were added to cfp.lines and cfp.vect. @@ -81,8 +81,8 @@ The LambertCylindrical projection was added to cfp.mapset. 9. Mapping change internally ============================ -A mapping change was made internally to change from f.ref('rotated_latitude_longitude') to -f.ref('grid_mapping_name:rotated_latitude_longitude'). This was due to a feature introduced in +A mapping change was made internally to change from f.ref('rotated_latitude_longitude') to +f.ref('grid_mapping_name:rotated_latitude_longitude'). This was due to a feature introduced in cf-python 3.8.0. The longer form always works and so this has been adopted. :: @@ -106,7 +106,7 @@ When making multiple plots on a page calling cfp.gpos(1) causes stray box lines 11. cfp.con - blockfill bugfix ============================== -If a blockfill contour plot is requested and the X coordinate has bounds and the Y coordinate does not have bounds then +If a blockfill contour plot is requested and the X coordinate has bounds and the Y coordinate does not have bounds then an error occurs. :: @@ -118,7 +118,7 @@ an error occurs. 12. cfp.bfill - default plotting order changed ============================================== -The default plotting order for cfp.bill has been changed from None to 4. If any issues arise because of this please report +The default plotting order for cfp.bill has been changed from None to 4. If any issues arise because of this please report them to me - andy.heaps@ncas.ac.uk. :: @@ -141,7 +141,7 @@ An alpha transparency setting was added to cfp.vect. 14. cfp.mapset - overlay map plots stopped working ================================================== -More recent versions of Cartopy stopped overlay map plots from working. +More recent versions of Cartopy stopped overlay map plots from working. :: @@ -152,7 +152,7 @@ More recent versions of Cartopy stopped overlay map plots from working. 15. cfp.cf_data_assign - internal routine updated ================================================= -The internal data assignment routine cfp.cf_data_assign was updated to use the cf-python +The internal data assignment routine cfp.cf_data_assign was updated to use the cf-python filter_by_axis method in f.coordinate. @@ -168,8 +168,8 @@ filter_by_axis method in f.coordinate. Cartopy has an issue with higher latitude vectors as described at https://github.com/SciTools/cartopy/issues/1179. -The following code sets all the u and v components to be 10m/s so it would be expected that the vectors will be at -45 degrees to the longitude lines. Prior to the modification this wasn't the case. +The following code sets all the u and v components to be 10m/s so it would be expected that the vectors will be at +45 degrees to the longitude lines. Prior to the modification this wasn't the case. :: @@ -204,22 +204,22 @@ Cartopy version 0.20.0 and possibly later cause a contour over maps issue in cf- :: Cartopy version check in place - - + + 18. cfp.con - changes to ptype=0 code ===================================== - -Additional code was added to cfp.con to cope with data which has one axis of longitude, latitude, pressure, time + +Additional code was added to cfp.con to cope with data which has one axis of longitude, latitude, pressure, time and another that isn't recogised as one of these. - + :: Changed - - + + 19. cfp.con - improved Z axis detection ======================================= - + The cf-plot find_dim_names routine was modified to use the cf-python get_data_axes method leading to more reliable Z axis detection when multiple Z axes are defined in the field. @@ -227,8 +227,8 @@ are defined in the field. :: Changed - - + + 20. cfp.con - transform_first - higher resolution map data contour plots ======================================================================== @@ -243,32 +243,32 @@ When there are more that 400 longitude points the option is set automatically bu :: Done - + 21. cfp.con - blockfill_fast - faster blockfill plotting ======================================================== -Higher resolution data causes blockfill plotting to slow down markedly due to the number of cells plotted. The blockfill_fast option was added to cfp.con which -uses the Matplotlib pcolormesh routine to produce a much faster plot. The original blockfill plotting is more accurate though and careful comparison of plots made both methods show +Higher resolution data causes blockfill plotting to slow down markedly due to the number of cells plotted. The blockfill_fast option was added to cfp.con which +uses the Matplotlib pcolormesh routine to produce a much faster plot. The original blockfill plotting is more accurate though and careful comparison of plots made both methods show small differences particularly at higher latitudes. One blockfill plot went from 174 seconds to 4.3 seconds using the new option. :: Done - - + + 22. cfp.find_dim_names bug ========================== - + If numpy arrays are passed for plotting some recently added code in cfp.find_dim_names tried to find the dimension names in the field. The code was modified to not do this for this class of data. - + :: Fixed - - + + 23. Central data local added for cartopy ======================================== @@ -278,7 +278,7 @@ If the user has a central location for cartopy data it can be specified with the :: Added - + 24. cfp.gvals - final catch missing for no values ================================================= @@ -300,8 +300,8 @@ An error occurs in cartopy.add_cyclic_point if the longitudes aren't regular. A :: Fixed - - + + 26. plot titles - change cell methods to cell_methods ===================================================== @@ -327,10 +327,10 @@ A bug in the title code for the southern polar stereographic projection has been 28. cfp.con - added nlevs option ================================ -The nlevs option to cfp.con was added which specifies the number of levels for to use for contour and fast -blockfill methods. For example cfp.con(f, nlevs=200, lines=False) will draw 200 filled contours and turn the line -contours off. This is useful when looking at data which is very close together where the traditional contour -levels don't show the detail in the field. The colour map for a divergent field such as zonal wind, 'scale1', +The nlevs option to cfp.con was added which specifies the number of levels for to use for contour and fast +blockfill methods. For example cfp.con(f, nlevs=200, lines=False) will draw 200 filled contours and turn the line +contours off. This is useful when looking at data which is very close together where the traditional contour +levels don't show the detail in the field. The colour map for a divergent field such as zonal wind, 'scale1', is not necessarily centred on zero with this option so more care with interpretation is needed. @@ -343,55 +343,43 @@ is not necessarily centred on zero with this option so more care with interpreta ================================= cfp.con was changed to fix some bugs with the identification and plotting of axes. - + :: Fixed - + 30. cfp.generate_titles - update code to include cell_method qualifiers ======================================================================= - + cfp.generate_titles was updated to include the text for any cell_method qualifiers. - - + + :: Fixed - - + + 31. cfp.con - axis labelling issues with rotated pole coordinates ================================================================= - + cfp.con produced extraneous axis labels for rotated pole coordinates. - - + + :: - + Fixed - - + + 32. cfp.plot_map_axes - mods for cartopy > 0.20.0 ================================================= -The use of outline_patch.set_visible(False) to remove a surrounding box for polar stereographic and lcc plots has been change to +The use of outline_patch.set_visible(False) to remove a surrounding box for polar stereographic and lcc plots has been change to set_frame_on(False) as the previous method has been depreciated from cartopy 0.20.0. :: Changed - - - - - - - - - - - - diff --git a/docs/build/_sources/version_3.2.rst.txt b/docs/build/_sources/version_3.2.rst.txt index 3421da0..e5931ab 100644 --- a/docs/build/_sources/version_3.2.rst.txt +++ b/docs/build/_sources/version_3.2.rst.txt @@ -28,9 +28,9 @@ Code didn't check for no points returned from a where statement causing a crash :: Fixed - - - + + + 2. cfp.bfill_ugrid - update for shapely 2.0 =========================================== @@ -41,12 +41,12 @@ Update shapely polygon coordinate extraction so code will work with shapely 2.0 # New method for shapely 2.0 + poly_mapped = sgeom.mapping(geom_cyl.geoms[0]) coords = list(poly_mapped['coordinates'][0]) - + :: - Fixed - + Fixed + 3. cfp.con - line_labels not honoured @@ -61,18 +61,18 @@ cfp.con : line_labels were not honoured. -4. cfp.levs - need all of min, max and step to define a set of contour levels +4. cfp.levs - need all of min, max and step to define a set of contour levels ============================================================================= -cfp.levs - need all of min, max and step to define a set of contour levels +cfp.levs - need all of min, max and step to define a set of contour levels :: Fixed - - - + + + 5. cfp.cbar : error when position is specified =============================================== @@ -82,9 +82,9 @@ cfp.cbar : error when position is specified :: Fixed - - - + + + 6. cfp.dim_titles - titles and plot positioning issues fixed ============================================================ @@ -99,14 +99,14 @@ cfp.dim_titles - titles and plot positioning issues were fixed. 7. cfp.stipple - not working for Robinson projection ==================================================== - + cfp.stipple wasn't working for the Robinson projection. :: Fixed - + 8. cfp.titles - auxiliary axes sometimes caused an issue @@ -121,18 +121,18 @@ cfp-titles - auxiliary axes sometimes caused an issue. -9. cfp.mapset - when a cyl mapset is done the colour scale should be relevant for the area selected +9. cfp.mapset - when a cyl mapset is done the colour scale should be relevant for the area selected =================================================================================================== cfp.mapset - when a cyl mapset is done the colour scale should be relevant for the area selected. - - + + :: Changed - - - + + + 10. cfp.levs - need all of min, max and step to define a set of contour levels ============================================================================== @@ -201,13 +201,13 @@ In cfp.bfill the map transform wasn;t passed through to the blockfill_fast code :: Fixed - - -16. cfp.con - new test for spatially irregular data points + + +16. cfp.con - new test for spatially irregular data points ========================================================== -A new test was introduced to cfp.con to check whether the data points are spatially irregular. This is done with the -x points comparing the size of x to the size of the unique x points. User specified values of True or False override +A new test was introduced to cfp.con to check whether the data points are spatially irregular. This is done with the +x points comparing the size of x to the size of the unique x points. User specified values of True or False override the new internal test. @@ -266,8 +266,8 @@ cfp.setvars - grid=True doesn't work on a cylindrical projection map. The grid :: Fixed - - + + 21. cfp.setvars - feature_zorder parameter added ================================================ @@ -277,8 +277,8 @@ In cfp.setvars the feature_zorder parameter was added. This controls the plotti :: Changed - - + + 22. cfp.con - blockfill and blockfill_fast for 2D data added ============================================================ @@ -288,9 +288,9 @@ cfp.con - blockfill and blockfill_fast for 2D data added. :: Added - - -23. cfp.con - code to subspace field to user defined map removed + + +23. cfp.con - code to subspace field to user defined map removed ================================================================ cfp-con - code to subspace field to user defined map removed as this was causing issues with blank plots. @@ -299,10 +299,3 @@ cfp-con - code to subspace field to user defined map removed as this was causing :: Removed - - - - - - - diff --git a/docs/build/_sources/version_3.3.rst.txt b/docs/build/_sources/version_3.3.rst.txt index d016c4c..3f06d0c 100644 --- a/docs/build/_sources/version_3.3.rst.txt +++ b/docs/build/_sources/version_3.3.rst.txt @@ -7,10 +7,10 @@ version 3.3 changes -0. Ugrid support added -====================== +0. UGRID support updated +======================== -Ugrid support added +UGRID support updated :: diff --git a/docs/build/_sources/versions.rst.txt b/docs/build/_sources/versions.rst.txt index 2e49d2d..97ac935 100644 --- a/docs/build/_sources/versions.rst.txt +++ b/docs/build/_sources/versions.rst.txt @@ -29,19 +29,17 @@ Planned releases - 3.0 Port to Python 3 and Mac OSX :ref:`version_3.0` - 3.1 UGRID support :ref:`version_3.1` - 3.2 Rolling bugfix version :ref:`version_3.2` -- 3.2 Ugrid support added :ref:`version_3.3` +- 3.3 UGRID support updated :ref:`version_3.3` Further functionality may be added on request - please email with details. -| -| -| -| -| -| -| -| - - +| +| +| +| +| +| +| +| diff --git a/docs/build/_sources/wrf.rst.txt b/docs/build/_sources/wrf.rst.txt index 3ff85f4..ccd59eb 100644 --- a/docs/build/_sources/wrf.rst.txt +++ b/docs/build/_sources/wrf.rst.txt @@ -8,7 +8,7 @@ WRF data Output data from the Weather Research and Forecasting (WRF) Model is some distance from being CF compliant. A Python script is available, from the University of Cantabria, that converts WRF data into CF netCDF. The Python script can be downloaded from http://www.meteo.unican.es/wiki/cordexwrf/SoftwareTools/WrfncXnj -Our input file here is called wrf.nc. As the file is large at 5GB this file isn't distributed and this is a worked example of what is needed. +Our input file here is called wrf.nc. As the file is large at 5GB this file isn't distributed and this is a worked example of what is needed. **python wrfncxnj.py -v T2 -o wrf2.nc wrf.nc** @@ -21,7 +21,7 @@ Example 43 - plotting WRF data ------------------------------ .. image:: images/fig43.png - :scale: 52% + :scale: 52% :: @@ -33,8 +33,5 @@ Example 43 - plotting WRF data cfp.con(t2, lines=False) -| -| - - - +| +| diff --git a/docs/build/_static/basic.css b/docs/build/_static/basic.css index 43fb704..ce119f8 100644 --- a/docs/build/_static/basic.css +++ b/docs/build/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/build/_static/classic.css b/docs/build/_static/classic.css deleted file mode 100644 index 20d230d..0000000 --- a/docs/build/_static/classic.css +++ /dev/null @@ -1,286 +0,0 @@ -/* - * classic.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- classic theme. - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -html { - /* CSS hack for macOS's scrollbar (see #1125) */ - background-color: #FFFFFF; -} - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - display: flex; - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 150px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { - top: 30px; - bottom: 0; - margin: 0; - position: fixed; - overflow: auto; - height: auto; -} -/* this is nice, but it it leads to hidden headings when jumping - to an anchor */ -/* -div.related { - position: fixed; -} - -div.documentwrapper { - margin-top: 30px; -} -*/ - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #551a8b; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -nav.contents, -aside.topic, -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: unset; - color: unset; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -code { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th, dl.field-list > dt { - background-color: #ede; -} - -.warning code { - background: #efc2c2; -} - -.note code { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} - -div.code-block-caption { - color: #efefef; - background-color: #1c4e63; -} \ No newline at end of file diff --git a/docs/build/_static/default.css b/docs/build/_static/default.css deleted file mode 100644 index 81b9363..0000000 --- a/docs/build/_static/default.css +++ /dev/null @@ -1 +0,0 @@ -@import url("classic.css"); diff --git a/docs/build/_static/doctools.js b/docs/build/_static/doctools.js index d06a71d..4d67807 100644 --- a/docs/build/_static/doctools.js +++ b/docs/build/_static/doctools.js @@ -4,7 +4,7 @@ * * Base JavaScript utilities for all Sphinx HTML documentation. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/build/_static/graphviz.css b/docs/build/_static/graphviz.css index 8d81c02..027576e 100644 --- a/docs/build/_static/graphviz.css +++ b/docs/build/_static/graphviz.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- graphviz extension. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/docs/build/_static/language_data.js b/docs/build/_static/language_data.js index 250f566..367b8ed 100644 --- a/docs/build/_static/language_data.js +++ b/docs/build/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -13,7 +13,7 @@ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, is available */ +/* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer diff --git a/docs/build/_static/pygments.css b/docs/build/_static/pygments.css index 0d49244..012e6a0 100644 --- a/docs/build/_static/pygments.css +++ b/docs/build/_static/pygments.css @@ -1,75 +1,152 @@ -pre { line-height: 125%; } -td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight .hll { background-color: #ffffcc } -.highlight { background: #eeffcc; } -.highlight .c { color: #408090; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #007020; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #007020 } /* Comment.Preproc */ -.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #333333 } /* Generic.Output */ -.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ -.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #007020 } /* Keyword.Pseudo */ -.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #902000 } /* Keyword.Type */ -.highlight .m { color: #208050 } /* Literal.Number */ -.highlight .s { color: #4070a0 } /* Literal.String */ -.highlight .na { color: #4070a0 } /* Name.Attribute */ -.highlight .nb { color: #007020 } /* Name.Builtin */ -.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.highlight .no { color: #60add5 } /* Name.Constant */ -.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #007020 } /* Name.Exception */ -.highlight .nf { color: #06287e } /* Name.Function */ -.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #bb60d5 } /* Name.Variable */ -.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mb { color: #208050 } /* Literal.Number.Bin */ -.highlight .mf { color: #208050 } /* Literal.Number.Float */ -.highlight .mh { color: #208050 } /* Literal.Number.Hex */ -.highlight .mi { color: #208050 } /* Literal.Number.Integer */ -.highlight .mo { color: #208050 } /* Literal.Number.Oct */ -.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ -.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ -.highlight .sc { color: #4070a0 } /* Literal.String.Char */ -.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ -.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ -.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ -.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.highlight .sx { color: #c65d09 } /* Literal.String.Other */ -.highlight .sr { color: #235388 } /* Literal.String.Regex */ -.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ -.highlight .ss { color: #517918 } /* Literal.String.Symbol */ -.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #06287e } /* Name.Function.Magic */ -.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ -.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ -.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ -.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ -.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file +html[data-theme="light"] .highlight pre { line-height: 125%; } +html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight .hll { background-color: #fae4c2 } +html[data-theme="light"] .highlight { background: #fefefe; color: #080808 } +html[data-theme="light"] .highlight .c { color: #515151 } /* Comment */ +html[data-theme="light"] .highlight .err { color: #a12236 } /* Error */ +html[data-theme="light"] .highlight .k { color: #6730c5 } /* Keyword */ +html[data-theme="light"] .highlight .l { color: #7f4707 } /* Literal */ +html[data-theme="light"] .highlight .n { color: #080808 } /* Name */ +html[data-theme="light"] .highlight .o { color: #00622f } /* Operator */ +html[data-theme="light"] .highlight .p { color: #080808 } /* Punctuation */ +html[data-theme="light"] .highlight .ch { color: #515151 } /* Comment.Hashbang */ +html[data-theme="light"] .highlight .cm { color: #515151 } /* Comment.Multiline */ +html[data-theme="light"] .highlight .cp { color: #515151 } /* Comment.Preproc */ +html[data-theme="light"] .highlight .cpf { color: #515151 } /* Comment.PreprocFile */ +html[data-theme="light"] .highlight .c1 { color: #515151 } /* Comment.Single */ +html[data-theme="light"] .highlight .cs { color: #515151 } /* Comment.Special */ +html[data-theme="light"] .highlight .gd { color: #005b82 } /* Generic.Deleted */ +html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="light"] .highlight .gh { color: #005b82 } /* Generic.Heading */ +html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="light"] .highlight .gu { color: #005b82 } /* Generic.Subheading */ +html[data-theme="light"] .highlight .kc { color: #6730c5 } /* Keyword.Constant */ +html[data-theme="light"] .highlight .kd { color: #6730c5 } /* Keyword.Declaration */ +html[data-theme="light"] .highlight .kn { color: #6730c5 } /* Keyword.Namespace */ +html[data-theme="light"] .highlight .kp { color: #6730c5 } /* Keyword.Pseudo */ +html[data-theme="light"] .highlight .kr { color: #6730c5 } /* Keyword.Reserved */ +html[data-theme="light"] .highlight .kt { color: #7f4707 } /* Keyword.Type */ +html[data-theme="light"] .highlight .ld { color: #7f4707 } /* Literal.Date */ +html[data-theme="light"] .highlight .m { color: #7f4707 } /* Literal.Number */ +html[data-theme="light"] .highlight .s { color: #00622f } /* Literal.String */ +html[data-theme="light"] .highlight .na { color: #912583 } /* Name.Attribute */ +html[data-theme="light"] .highlight .nb { color: #7f4707 } /* Name.Builtin */ +html[data-theme="light"] .highlight .nc { color: #005b82 } /* Name.Class */ +html[data-theme="light"] .highlight .no { color: #005b82 } /* Name.Constant */ +html[data-theme="light"] .highlight .nd { color: #7f4707 } /* Name.Decorator */ +html[data-theme="light"] .highlight .ni { color: #00622f } /* Name.Entity */ +html[data-theme="light"] .highlight .ne { color: #6730c5 } /* Name.Exception */ +html[data-theme="light"] .highlight .nf { color: #005b82 } /* Name.Function */ +html[data-theme="light"] .highlight .nl { color: #7f4707 } /* Name.Label */ +html[data-theme="light"] .highlight .nn { color: #080808 } /* Name.Namespace */ +html[data-theme="light"] .highlight .nx { color: #080808 } /* Name.Other */ +html[data-theme="light"] .highlight .py { color: #005b82 } /* Name.Property */ +html[data-theme="light"] .highlight .nt { color: #005b82 } /* Name.Tag */ +html[data-theme="light"] .highlight .nv { color: #a12236 } /* Name.Variable */ +html[data-theme="light"] .highlight .ow { color: #6730c5 } /* Operator.Word */ +html[data-theme="light"] .highlight .pm { color: #080808 } /* Punctuation.Marker */ +html[data-theme="light"] .highlight .w { color: #080808 } /* Text.Whitespace */ +html[data-theme="light"] .highlight .mb { color: #7f4707 } /* Literal.Number.Bin */ +html[data-theme="light"] .highlight .mf { color: #7f4707 } /* Literal.Number.Float */ +html[data-theme="light"] .highlight .mh { color: #7f4707 } /* Literal.Number.Hex */ +html[data-theme="light"] .highlight .mi { color: #7f4707 } /* Literal.Number.Integer */ +html[data-theme="light"] .highlight .mo { color: #7f4707 } /* Literal.Number.Oct */ +html[data-theme="light"] .highlight .sa { color: #00622f } /* Literal.String.Affix */ +html[data-theme="light"] .highlight .sb { color: #00622f } /* Literal.String.Backtick */ +html[data-theme="light"] .highlight .sc { color: #00622f } /* Literal.String.Char */ +html[data-theme="light"] .highlight .dl { color: #00622f } /* Literal.String.Delimiter */ +html[data-theme="light"] .highlight .sd { color: #00622f } /* Literal.String.Doc */ +html[data-theme="light"] .highlight .s2 { color: #00622f } /* Literal.String.Double */ +html[data-theme="light"] .highlight .se { color: #00622f } /* Literal.String.Escape */ +html[data-theme="light"] .highlight .sh { color: #00622f } /* Literal.String.Heredoc */ +html[data-theme="light"] .highlight .si { color: #00622f } /* Literal.String.Interpol */ +html[data-theme="light"] .highlight .sx { color: #00622f } /* Literal.String.Other */ +html[data-theme="light"] .highlight .sr { color: #a12236 } /* Literal.String.Regex */ +html[data-theme="light"] .highlight .s1 { color: #00622f } /* Literal.String.Single */ +html[data-theme="light"] .highlight .ss { color: #005b82 } /* Literal.String.Symbol */ +html[data-theme="light"] .highlight .bp { color: #7f4707 } /* Name.Builtin.Pseudo */ +html[data-theme="light"] .highlight .fm { color: #005b82 } /* Name.Function.Magic */ +html[data-theme="light"] .highlight .vc { color: #a12236 } /* Name.Variable.Class */ +html[data-theme="light"] .highlight .vg { color: #a12236 } /* Name.Variable.Global */ +html[data-theme="light"] .highlight .vi { color: #a12236 } /* Name.Variable.Instance */ +html[data-theme="light"] .highlight .vm { color: #7f4707 } /* Name.Variable.Magic */ +html[data-theme="light"] .highlight .il { color: #7f4707 } /* Literal.Number.Integer.Long */ +html[data-theme="dark"] .highlight pre { line-height: 125%; } +html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e } +html[data-theme="dark"] .highlight { background: #2b2b2b; color: #f8f8f2 } +html[data-theme="dark"] .highlight .c { color: #ffd900 } /* Comment */ +html[data-theme="dark"] .highlight .err { color: #ffa07a } /* Error */ +html[data-theme="dark"] .highlight .k { color: #dcc6e0 } /* Keyword */ +html[data-theme="dark"] .highlight .l { color: #ffd900 } /* Literal */ +html[data-theme="dark"] .highlight .n { color: #f8f8f2 } /* Name */ +html[data-theme="dark"] .highlight .o { color: #abe338 } /* Operator */ +html[data-theme="dark"] .highlight .p { color: #f8f8f2 } /* Punctuation */ +html[data-theme="dark"] .highlight .ch { color: #ffd900 } /* Comment.Hashbang */ +html[data-theme="dark"] .highlight .cm { color: #ffd900 } /* Comment.Multiline */ +html[data-theme="dark"] .highlight .cp { color: #ffd900 } /* Comment.Preproc */ +html[data-theme="dark"] .highlight .cpf { color: #ffd900 } /* Comment.PreprocFile */ +html[data-theme="dark"] .highlight .c1 { color: #ffd900 } /* Comment.Single */ +html[data-theme="dark"] .highlight .cs { color: #ffd900 } /* Comment.Special */ +html[data-theme="dark"] .highlight .gd { color: #00e0e0 } /* Generic.Deleted */ +html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="dark"] .highlight .gh { color: #00e0e0 } /* Generic.Heading */ +html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="dark"] .highlight .gu { color: #00e0e0 } /* Generic.Subheading */ +html[data-theme="dark"] .highlight .kc { color: #dcc6e0 } /* Keyword.Constant */ +html[data-theme="dark"] .highlight .kd { color: #dcc6e0 } /* Keyword.Declaration */ +html[data-theme="dark"] .highlight .kn { color: #dcc6e0 } /* Keyword.Namespace */ +html[data-theme="dark"] .highlight .kp { color: #dcc6e0 } /* Keyword.Pseudo */ +html[data-theme="dark"] .highlight .kr { color: #dcc6e0 } /* Keyword.Reserved */ +html[data-theme="dark"] .highlight .kt { color: #ffd900 } /* Keyword.Type */ +html[data-theme="dark"] .highlight .ld { color: #ffd900 } /* Literal.Date */ +html[data-theme="dark"] .highlight .m { color: #ffd900 } /* Literal.Number */ +html[data-theme="dark"] .highlight .s { color: #abe338 } /* Literal.String */ +html[data-theme="dark"] .highlight .na { color: #ffd900 } /* Name.Attribute */ +html[data-theme="dark"] .highlight .nb { color: #ffd900 } /* Name.Builtin */ +html[data-theme="dark"] .highlight .nc { color: #00e0e0 } /* Name.Class */ +html[data-theme="dark"] .highlight .no { color: #00e0e0 } /* Name.Constant */ +html[data-theme="dark"] .highlight .nd { color: #ffd900 } /* Name.Decorator */ +html[data-theme="dark"] .highlight .ni { color: #abe338 } /* Name.Entity */ +html[data-theme="dark"] .highlight .ne { color: #dcc6e0 } /* Name.Exception */ +html[data-theme="dark"] .highlight .nf { color: #00e0e0 } /* Name.Function */ +html[data-theme="dark"] .highlight .nl { color: #ffd900 } /* Name.Label */ +html[data-theme="dark"] .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +html[data-theme="dark"] .highlight .nx { color: #f8f8f2 } /* Name.Other */ +html[data-theme="dark"] .highlight .py { color: #00e0e0 } /* Name.Property */ +html[data-theme="dark"] .highlight .nt { color: #00e0e0 } /* Name.Tag */ +html[data-theme="dark"] .highlight .nv { color: #ffa07a } /* Name.Variable */ +html[data-theme="dark"] .highlight .ow { color: #dcc6e0 } /* Operator.Word */ +html[data-theme="dark"] .highlight .pm { color: #f8f8f2 } /* Punctuation.Marker */ +html[data-theme="dark"] .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +html[data-theme="dark"] .highlight .mb { color: #ffd900 } /* Literal.Number.Bin */ +html[data-theme="dark"] .highlight .mf { color: #ffd900 } /* Literal.Number.Float */ +html[data-theme="dark"] .highlight .mh { color: #ffd900 } /* Literal.Number.Hex */ +html[data-theme="dark"] .highlight .mi { color: #ffd900 } /* Literal.Number.Integer */ +html[data-theme="dark"] .highlight .mo { color: #ffd900 } /* Literal.Number.Oct */ +html[data-theme="dark"] .highlight .sa { color: #abe338 } /* Literal.String.Affix */ +html[data-theme="dark"] .highlight .sb { color: #abe338 } /* Literal.String.Backtick */ +html[data-theme="dark"] .highlight .sc { color: #abe338 } /* Literal.String.Char */ +html[data-theme="dark"] .highlight .dl { color: #abe338 } /* Literal.String.Delimiter */ +html[data-theme="dark"] .highlight .sd { color: #abe338 } /* Literal.String.Doc */ +html[data-theme="dark"] .highlight .s2 { color: #abe338 } /* Literal.String.Double */ +html[data-theme="dark"] .highlight .se { color: #abe338 } /* Literal.String.Escape */ +html[data-theme="dark"] .highlight .sh { color: #abe338 } /* Literal.String.Heredoc */ +html[data-theme="dark"] .highlight .si { color: #abe338 } /* Literal.String.Interpol */ +html[data-theme="dark"] .highlight .sx { color: #abe338 } /* Literal.String.Other */ +html[data-theme="dark"] .highlight .sr { color: #ffa07a } /* Literal.String.Regex */ +html[data-theme="dark"] .highlight .s1 { color: #abe338 } /* Literal.String.Single */ +html[data-theme="dark"] .highlight .ss { color: #00e0e0 } /* Literal.String.Symbol */ +html[data-theme="dark"] .highlight .bp { color: #ffd900 } /* Name.Builtin.Pseudo */ +html[data-theme="dark"] .highlight .fm { color: #00e0e0 } /* Name.Function.Magic */ +html[data-theme="dark"] .highlight .vc { color: #ffa07a } /* Name.Variable.Class */ +html[data-theme="dark"] .highlight .vg { color: #ffa07a } /* Name.Variable.Global */ +html[data-theme="dark"] .highlight .vi { color: #ffa07a } /* Name.Variable.Instance */ +html[data-theme="dark"] .highlight .vm { color: #ffd900 } /* Name.Variable.Magic */ +html[data-theme="dark"] .highlight .il { color: #ffd900 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/build/_static/searchtools.js b/docs/build/_static/searchtools.js index 7918c3f..b08d58c 100644 --- a/docs/build/_static/searchtools.js +++ b/docs/build/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => { .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms) + Search.makeSearchSummary(data, searchTerms, anchor) ); // highlight search terms in the summary if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js @@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => { ); else Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, @@ -137,6 +137,22 @@ const _displayNextItem = ( // search finished, update title and status message else _finishSearch(resultCount); }; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -160,13 +176,26 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString) => { + htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; + if (docContent) return docContent.textContent; + console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, @@ -239,16 +268,7 @@ const Search = { else Search.deferQuery(query); }, - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - + _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -284,21 +304,38 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - // array of [docname, title, anchor, descr, score, filename] - let results = []; + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase(); + const queryLower = query.toLowerCase().trim(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) - results.push([ + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score, + score + boost, filenames[file], ]); } @@ -308,46 +345,47 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id] of foundEntries) { - let score = Math.round(100 * queryLower.length / entry.length) - results.push([ + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - ]); + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } } } } // lookup as object objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) + normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -361,7 +399,12 @@ const Search = { return acc; }, []); - results = results.reverse(); + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy @@ -466,14 +509,18 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } } // no match but word was a required one @@ -496,9 +543,8 @@ const Search = { // create the mapping files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); @@ -549,8 +595,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords) => { - const text = Search.htmlToText(htmlText); + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/docs/build/_static/sidebar.js b/docs/build/_static/sidebar.js deleted file mode 100644 index c5e2692..0000000 --- a/docs/build/_static/sidebar.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * sidebar.js - * ~~~~~~~~~~ - * - * This script makes the Sphinx sidebar collapsible. - * - * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds - * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton - * used to collapse and expand the sidebar. - * - * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden - * and the width of the sidebar and the margin-left of the document - * are decreased. When the sidebar is expanded the opposite happens. - * This script saves a per-browser/per-session cookie used to - * remember the position of the sidebar among the pages. - * Once the browser is closed the cookie is deleted and the position - * reset to the default (expanded). - * - * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -const initialiseSidebar = () => { - - - - - // global elements used by the functions. - const bodyWrapper = document.getElementsByClassName("bodywrapper")[0] - const sidebar = document.getElementsByClassName("sphinxsidebar")[0] - const sidebarWrapper = document.getElementsByClassName('sphinxsidebarwrapper')[0] - const sidebarButton = document.getElementById("sidebarbutton") - const sidebarArrow = sidebarButton.querySelector('span') - - // for some reason, the document has no sidebar; do not run into errors - if (typeof sidebar === "undefined") return; - - const flipArrow = element => element.innerText = (element.innerText === "»") ? "«" : "»" - - const collapse_sidebar = () => { - bodyWrapper.style.marginLeft = ".8em"; - sidebar.style.width = ".8em" - sidebarWrapper.style.display = "none" - flipArrow(sidebarArrow) - sidebarButton.title = _('Expand sidebar') - window.localStorage.setItem("sidebar", "collapsed") - } - - const expand_sidebar = () => { - bodyWrapper.style.marginLeft = "" - sidebar.style.removeProperty("width") - sidebarWrapper.style.display = "" - flipArrow(sidebarArrow) - sidebarButton.title = _('Collapse sidebar') - window.localStorage.setItem("sidebar", "expanded") - } - - sidebarButton.addEventListener("click", () => { - (sidebarWrapper.style.display === "none") ? expand_sidebar() : collapse_sidebar() - }) - - if (!window.localStorage.getItem("sidebar")) return - const value = window.localStorage.getItem("sidebar") - if (value === "collapsed") collapse_sidebar(); - else if (value === "expanded") expand_sidebar(); -} - -if (document.readyState !== "loading") initialiseSidebar() -else document.addEventListener("DOMContentLoaded", initialiseSidebar) \ No newline at end of file diff --git a/docs/build/add_cyclic.html b/docs/build/add_cyclic.html index 278f59a..11a0896 100644 --- a/docs/build/add_cyclic.html +++ b/docs/build/add_cyclic.html @@ -1,62 +1,251 @@ + - + + + add_cyclic — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

add_cyclic

-
-
-cfplot.add_cyclic(field, lons)[source]
-
-
add_cyclic is a wrapper for cartopy_util.add_cyclic_point(field, lons)
-
This is needed for the case of when the longitudes are not evenly spaced
-
due to numpy rounding which causes an error from the cartopy wrapping routine.
-
In this case the longitudes are promoted to 64 bit and then rounded
-
to an appropriate number of decimal places before passing to the cartopy
-
add_cyclic routine.
+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

add_cyclic#

+
+
+cfplot.add_cyclic(field, lons)[source]#
+
+
A wrapper for cartopy_util.add_cyclic_point(field, lons).
+

+
This is needed for the case of when the longitudes are not evenly spaced
+
due to numpy rounding which causes an error from the cartopy wrapping
+
routine. In this case the longitudes are promoted to 64 bit and then
+
rounded to an appropriate number of decimal places before passing to
+
the cartopy add_cyclic routine.
+
+
+ +
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/advanced.html b/docs/build/advanced.html index 0524c64..9a1d70a 100644 --- a/docs/build/advanced.html +++ b/docs/build/advanced.html @@ -1,43 +1,323 @@ + - + + + Advanced Use — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

Advanced Use

+

Advanced Use#

Here are some hints and tips on the advanced use of cf-plot.

-

Adding user defined lines and text to plots

+

Adding user defined lines and text to plots#

In cf-plot the plot is stored in a plot object with the name cfp.plotvars.plot. If you are making a map plot the the map object is cfp.plotvars.mymap and this is the object you should operate on. The page containing the plots is named cfp.plotvars.plot_master.

To see all the methods for the plot object type

cfp.gopen()
@@ -47,7 +327,8 @@ 

Adding user defined lines and text to plots_images/advanced1.png +_images/advanced1.png +
import cf
 import cfplot as cfp
 import cartopy.crs as ccrs
@@ -96,9 +377,10 @@ 

Adding user defined lines and text to plots -

Plotting shape files

+

Plotting shape files#

In this example we make a blank map plot and plot the UK rivers from a shapefile. The shapefile used came from DIVA-GIS at http://www.diva-gis.org/gdata. The pyshp Python package is needed for this program.

-_images/advanced_shapefile.png +_images/advanced_shapefile.png +
import cf
 import cfplot as cfp
 import numpy as np
@@ -132,11 +414,12 @@ 

Plotting shape files

-

Making a transect plot

+

Making a transect plot#

In this example we make a contour plot and plot a transect. We use the cfp.regrid bilinear interpolation routine to interpolate the data. Interpolation points for this routine must be within the data limits of the original data. Care is needed to ensure that the field coordinates go from a low value to a high value. This is usually not an issue with longitude but occasionally with latitude (as in this case) the coordinate goes from the north pole to the south pole. A simple flip of the latitude and data is need here.

-_images/advanced_transect.png +_images/advanced_transect.png +
import cf
 import cfplot as cfp
 import numpy as np
@@ -185,7 +468,7 @@ 

Making a transect plot

-

Manually changing colours in a colour scale

+

Manually changing colours in a colour scale#

The simplest way to do this without writing any code is to modify the internal colour scale before plotting. The colours most people work with are stored as red green blue intensities on a scale of 0 to 255, with 0 being no intesity and 255 full intensity.

White will be represented as 255 255 255 and black as 0 0 0.

The internal colour scale is stored in cfp.plotvars.cs as hexadecimal code. To convert from decimal to hexadecimal use hex i.e. @@ -201,10 +484,11 @@

Manually changing colours in a colour scalecfp.con(f.subspace(time=15))

-_images/advanced2.png +_images/advanced2.png +
-

Colouring land and lakes

+

Colouring land and lakes#

This is done by changing the land_color, ocean_color and lake_color variables in cfp.setvars.

import cf
 import cfplot as cfp
@@ -213,10 +497,11 @@ 

Colouring land and lakescfp.con(f.subspace(time=15))

-_images/advanced3.png +_images/advanced3.png +
-

Plotting missing data

+

Plotting missing data#

Masked data isn't plotted.

import cf
 import cfplot as cfp
@@ -235,7 +520,8 @@ 

Plotting missing datacfp.con(h, blockfill=True, title='Plot with masked data')

-_images/advanced4.png +_images/advanced4.png +

Masked data is plotted as blockfill in grey.

# Turn off the hardmask and set masked points to 999
 h.hardmask=False
@@ -255,10 +541,11 @@ 

Plotting missing datacfp.gclose()

-_images/advanced5.png +_images/advanced5.png +
-

Blockfill with individual colours

+

Blockfill with individual colours#

If a plot needs to be built up as a series of blockfill plots then this is
possible using the cf-plot internal blockfill routine. A colour contour plot is
@@ -291,48 +578,112 @@

Blockfill with individual colourscfp.gclose()

-_images/advanced6.png +_images/advanced6.png + -
-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/axes.html b/docs/build/axes.html index b866b22..efa969f 100644 --- a/docs/build/axes.html +++ b/docs/build/axes.html @@ -1,45 +1,323 @@ + - + + + axes — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

axes

+

axes#

-cfplot.axes(xticks=None, xticklabels=None, yticks=None, yticklabels=None, xstep=None, ystep=None, xlabel=None, ylabel=None, title=None)[source]
+cfplot.axes(xticks=None, xticklabels=None, yticks=None, yticklabels=None, xstep=None, ystep=None, xlabel=None, ylabel=None, title=None)[source]#
-
axes is a function to set axes plotting parameters. The xstep and ystep
+
Set axes plotting parameters. The xstep and ystep
parameters are used to label the axes starting at the left hand side and
bottom of the plot respectively. For tighter control over labelling use
xticks, yticks to specify the tick positions and xticklabels,
@@ -68,43 +346,100 @@

axes -
-

-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/axes_plot.html b/docs/build/axes_plot.html index 9a96825..33694ed 100644 --- a/docs/build/axes_plot.html +++ b/docs/build/axes_plot.html @@ -1,45 +1,323 @@ + - + + + axes_plot — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

axes_plot

+

axes_plot#

-cfplot.axes_plot(xticks=None, xticklabels=None, yticks=None, yticklabels=None, xlabel=None, ylabel=None, title=None)[source]
+cfplot.axes_plot(xticks=None, xticklabels=None, yticks=None, yticklabels=None, xlabel=None, ylabel=None, title=None)[source]#
-
axes_plot is a system function to specify axes plotting parameters.
+
A system function to specify axes plotting parameters.
Use xticks, yticks to specify the tick positions and xticklabels,
yticklabels to specify the associated labels.

@@ -62,43 +340,100 @@

axes_plot

-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/bfill.html b/docs/build/bfill.html index e77d1e1..53de516 100644 --- a/docs/build/bfill.html +++ b/docs/build/bfill.html @@ -1,82 +1,251 @@ + - + + + bfill — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

bfill

-
-
-cfplot.bfill(f=None, x=None, y=None, clevs=False, lonlat=None, bound=False, alpha=1.0, single_fill_color=None, white=True, zorder=4, fast=None, transform=False, orca=False)[source]
-
-
bfill - block fill a field with colour rectangles
-
This is an internal routine and is not generally used by the user.
-

-
f=None - field
-
x=None - x points for field
-
y=None - y points for field
-
clevs=None - levels for filling
-
lonlat=None - longitude and latitude data
-
bound=False - x and y are cf data boundaries
-
alpha=alpha - transparency setting 0 to 1
-
white=True - colour unplotted areas white
-
single_fill_color=None - colour for a blockfill between two levels
-
-
- makes maplotlib named colours or
-
- hexadecimal notation - '#d3d3d3' for grey
-
-
zorder=4 - plotting order
-
fast=None - use fast plotting with pcolormesh which is useful for larger datasets
-
transform=False - map transform supplied by calling routine
-
orca=False - data is orca data
-
:Returns: - None
-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

bfill#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/calculate_levels.html b/docs/build/calculate_levels.html index c46203e..311778f 100644 --- a/docs/build/calculate_levels.html +++ b/docs/build/calculate_levels.html @@ -1,54 +1,251 @@ + - + + + vect — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

vect

-
-
-cfplot.calculate_levels(field=None, level_spacing=None, verbose=None)[source]
-
+ + + + + + + -
+ + + + +
+ + + + + + + + + +
+
+
+
+
-
-
+
+ +
+ + + + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

vect#

+
+
+cfplot.calculate_levels(field=None, level_spacing=None, verbose=None)[source]#
+

TODO DOCS.

+
+ +
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cbar.html b/docs/build/cbar.html index e8a9d34..c9cb2b3 100644 --- a/docs/build/cbar.html +++ b/docs/build/cbar.html @@ -1,45 +1,323 @@ + - + + + cbar — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

cbar

+

cbar#

-cfplot.cbar(labels=None, orientation=None, position=None, shrink=None, fraction=None, title=None, fontsize=None, fontweight=None, text_up_down=None, text_down_up=None, drawedges=None, levs=None, thick=None, anchor=None, extend=None, mid=None, verbose=None)[source]
+cfplot.cbar(labels=None, orientation=None, position=None, shrink=None, fraction=None, title=None, fontsize=None, fontweight=None, text_up_down=None, text_down_up=None, drawedges=None, levs=None, thick=None, anchor=None, extend=None, mid=None, verbose=None)[source]#
-
cbar is the cf-plot interface to the Matplotlib colorbar routine
+
The cf-plot interface to the Matplotlib colorbar routine.

labels - colorbar labels
orientation - orientation 'horizontal' or 'vertical'
@@ -63,62 +341,117 @@

Navigation

in normalised plot coordinates
-
anchor - default=0.3 - anchor point of colorbar within the fraction space.
+
anchor - default=0.3 - anchor point of colorbar within the fraction
-
0.0 = close to plot, 1.0 = further away
+
space. 0.0 = close to plot, 1.0 = further away
-
extend = None - extensions for colorbar. The default is for extensions at
+
extend = None - extensions for colorbar. The default is for
-
both ends.
+
extensions at both ends.
mid = False - label mid points of colours rather than the boundaries
verbose = None

-

-

-
-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cf_data_assign.html b/docs/build/cf_data_assign.html index 17c5fd7..f422482 100644 --- a/docs/build/cf_data_assign.html +++ b/docs/build/cf_data_assign.html @@ -1,83 +1,251 @@ + - + + + cf_data_assign — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

cf_data_assign

-
-
-cfplot.cf_data_assign(f=None, colorbar_title=None, verbose=None, rotated_vect=False)[source]
-
-
Check cf input data is okay and return data for contour plot.
-
This is an internal routine not used by the user.
-
f=None - input cf field
-
colorbar_title=None - input colour bar title
-
rotated vect=False - return 1D x and y for rotated plot vectors
-
verbose=None - set to 1 to get a verbose idea of what the
-
-
cf_data_assign is doing
-
-
-
-
Returns:
-
-
f - data for contouring
-
x - x coordinates of data (optional)
-
y - y coordinates of data (optional)
-
ptype - plot type
-
colorbar_title - colour bar title
-
xlabel - x label for plot
-
ylabel - y label for plot
-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+
-
-
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

cf_data_assign#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cf_var_name.html b/docs/build/cf_var_name.html index d114ba7..c2095b8 100644 --- a/docs/build/cf_var_name.html +++ b/docs/build/cf_var_name.html @@ -1,82 +1,251 @@ + - + + + cf_var_name — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

cf_var_name

-
-
-cfplot.cf_var_name(field=None, dim=None)[source]
-
-
cf_var_name - return the name from a supplied dimension
-
-
in the following order
-
ncvar
-
short_name
-
long_name
-
standard_name
-

-
-
field=None - field
-
dim=None - dimension required - 'dim0', 'dim1' etc.
-

-

-

-

-

-
-
-
Returns:
-

name

-
-
-
-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + +
+ +
+

cf_var_name#

+
+
+cfplot.cf_var_name(field=None, dim=None)[source]#
+
+
Return the name from a supplied dimension in order.
+

+
Names are returned in the following order:
+
* ncvar
+
* short_name
+
* long_name
+
* standard_name
+

+
field=None - field
+
dim=None - dimension required - 'dim0', 'dim1' etc.
+

+
+
+
Returns:
+

name

+
+
+
+ +
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
+
+
+ + + + + +
+
\ No newline at end of file diff --git a/docs/build/check_data.html b/docs/build/check_data.html index bc291e0..ff42817 100644 --- a/docs/build/check_data.html +++ b/docs/build/check_data.html @@ -1,68 +1,251 @@ + - + + + check_data — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

check_data

-
-
-cfplot.check_data(field=None, x=None, y=None)[source]
-
-
check_data - check user input contour data is correct.
-
This is an internal routine and is not used by the user.
-

-
field=None - field
-
x=None - x points for field
-
y=None - y points for field
-

-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + +
+ +
+

check_data#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+ + +
\ No newline at end of file diff --git a/docs/build/colour_scales.html b/docs/build/colour_scales.html index 2ada677..546b84f 100644 --- a/docs/build/colour_scales.html +++ b/docs/build/colour_scales.html @@ -1,40 +1,320 @@ + - + + + Colour scales — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

Colour scales

+

Colour scales#

There are two default colour scales in cf-plot:

  1. A continuous scale ('viridis') that goes from blue to green and then yellow and suits data that has no zero in it. For example air temperature in Kelvin or geopotential height - see example 1 in the plot gallery.

  2. @@ -42,7 +322,8 @@

    Navigation

When no calls have been made to cfp.cscale cf-plot selects one of theses scales based on whether there is a zero in the data passed for contouring. If a call is made to cfp.cscale with just a colour scale name cfp.cscale('radar'), for example, then this colour scale is used for all subsequent plots. The colour scale is adjusted automatically to fit the number of contour levels in the plot.

If a call to cfp.cscale specifies additional parameters to the colour scale, then the automatic colour adjustment is turned off giving the user fine tuning of colours as below.

-_images/cs1.png +_images/cs1.png +
cfp.levs(min=-80, max=80, step=10)
 cfp.scale('scale1')
 
@@ -52,7 +333,8 @@

Navigation


To change the number of colours in a scale use the ncols parameters.

-_images/cs2.png +_images/cs2.png +
cfp.cscale('scale1', ncols=12)
 cfp.levs(min=-5, max=5, step=1)
 
@@ -62,7 +344,8 @@

Navigation


To change the number of colours above and below the mid-point of the scale use the above and below parameters. This is useful for fields where you have differing extents of data above and below the zero line.

-_images/cs3.png +_images/cs3.png +
cfp.cscale('scale1', below=4, above=7)
 cfp.levs(min=-30, max=60, step=10)
 
@@ -72,18 +355,21 @@

Navigation


For data where you need white to indicate that this data region is insignificant use the white=white parameter. This can take single or multiple values of the index of the colour scale where white is required in the colour scale.

-_images/cs4.png +_images/cs4.png +
cfp.cscale('scale1', ncols=11, white=5)
 cfp.levs(manual=[-10,-8, -6, -4, -2, 2, 4, 6, 8, 10])
 
-_images/cs4.png +_images/cs4.png +

To reverse a colour scale use the reverse=1 option to cscale and specify the number of colours required.

cfp.cscale('scale1', reverse=1, ncols=10)
 

As a short example to show the flexibilty of the colour scale routines we will make a orography plot using the wiki_2_0.rgb orography/bathymetry colour scale. This has as many colours for bathymetry as for the oroggraphy but in this case we just need a blue ocean as we are really only interested in the orography. So in this case we will define a set of levels using levs and then match the colour scale to them. The wiki_2_0.rgb colour scale has as many colours for the ocean as for the land so we can use the above and below options

-_images/orog.png +_images/orog.png +
import cf
 import cfplot as cfp
 import numpy as np
@@ -94,7 +380,7 @@ 

Navigation

-

User defined colour scales

+

User defined colour scales#

Store these as rgb values in a file with one rgb value per line. i.e.

255 0   0
 255 255 255
@@ -107,7 +393,7 @@ 

User defined colour scales -

Selecting colours for graph lines

+

Selecting colours for graph lines#

This can be done in several ways:

  1. Select the colours from the Matplotlib colour names - Google 'Images for matplotlib color names'.

  2. @@ -123,13 +409,13 @@

    Selecting colours for graph lines -

    Predefined colour scales

    +

    Predefined colour scales#

    A lot of the following colour maps were downloaded from the NCAR Command Language web site. Users of the IDL guide colour maps can see these maps at the end of the colour scales.

-

Perceptually uniform colour scales

+

Perceptually uniform colour scales#

A selection of perceptually uniform colour scales for contouring data without a zero in. See The end of the rainbow and Matplotlib colour maps for a good discussion on colour scales, colour blindness and uniform colour scales.

- +
@@ -162,10 +448,11 @@

Perceptually uniform colour scales -

NCAR Command Language - MeteoSwiss colour maps

-

Name

Scale

+

NCAR Command Language - MeteoSwiss colour maps#

+
@@ -234,10 +521,11 @@

NCAR Command Language - MeteoSwiss colour maps -

NCAR Command Language - small color maps (<50 colours)

-

Name

Scale

+

NCAR Command Language - small color maps (<50 colours)#

+
@@ -434,10 +722,11 @@

NCAR Command Language - small color maps (<50 colours) -

NCAR Command Language - large colour maps (>50 colours)

-

Name

Scale

+

NCAR Command Language - large colour maps (>50 colours)#

+
@@ -654,10 +943,11 @@

NCAR Command Language - large colour maps (>50 colours) -

NCAR Command Language - Enhanced to help with colour blindness

-

Name

Scale

+

NCAR Command Language - Enhanced to help with colour blindness#

+
@@ -702,10 +992,11 @@

NCAR Command Language - Enhanced to help with colour blindness -

Orography/bathymetry colour scales

-

Name

Scale

+

Orography/bathymetry colour scales#

+
@@ -738,10 +1029,11 @@

Orography/bathymetry colour scales -

IDL guide scales

-

Name

Scale

+

IDL guide scales#

+
@@ -926,47 +1218,114 @@

IDL guide scales - - - - + + + +
+ +
+ + - + + + + + +
+
\ No newline at end of file diff --git a/docs/build/compare_arrays.html b/docs/build/compare_arrays.html index bbd1ace..a0b2fa3 100644 --- a/docs/build/compare_arrays.html +++ b/docs/build/compare_arrays.html @@ -1,64 +1,251 @@ + - + + + compare_arrays — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

compare_arrays

-
-
-cfplot.compare_arrays(ref=None, levs_test=None, gvals_test=None, mapaxis_test=None, min=None, max=None, step=None, mult=None, type=None)[source]
-
-
Compare arrays and return an error string if they don't match
-

-

-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + +
+ +
+

compare_arrays#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+ + +
\ No newline at end of file diff --git a/docs/build/compare_images.html b/docs/build/compare_images.html index 866063f..297d613 100644 --- a/docs/build/compare_images.html +++ b/docs/build/compare_images.html @@ -1,64 +1,251 @@ + - + + + compare_images — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

compare_images

-
-
-cfplot.compare_images(example=None)[source]
-
-
Compare images and return an error string if they don't match
-

-

-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + +
+ +
+

compare_images#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+ + +
\ No newline at end of file diff --git a/docs/build/con.html b/docs/build/con.html index f9f70a6..a37a387 100644 --- a/docs/build/con.html +++ b/docs/build/con.html @@ -1,45 +1,325 @@ + - + + + con — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

con

+

con#

-cfplot.con(f=None, x=None, y=None, fill=True, lines=True, line_labels=True, title=None, colorbar_title=None, colorbar=True, colorbar_label_skip=None, ptype=0, negative_linestyle='solid', blockfill=False, zero_thick=False, colorbar_shrink=None, colorbar_orientation=None, colorbar_position=None, xlog=False, ylog=False, axes=True, xaxis=True, yaxis=True, xticks=None, xticklabels=None, yticks=None, yticklabels=None, xlabel=None, ylabel=None, colors='k', swap_axes=False, verbose=None, linewidths=None, alpha=1.0, colorbar_text_up_down=False, colorbar_fontsize=None, colorbar_fontweight=None, colorbar_text_down_up=False, colorbar_drawedges=True, colorbar_fraction=None, colorbar_thick=None, colorbar_anchor=None, colorbar_labels=None, linestyles=None, zorder=1, level_spacing=None, irregular=None, face_lons=False, face_lats=False, face_connectivity=False, titles=False, mytest=False, transform_first=None, blockfill_fast=None, nlevs=False, orca=None, orca_skip=None, grid=False)[source]
+cfplot.con(f=None, x=None, y=None, fill=True, lines=True, line_labels=True, title=None, colorbar_title=None, colorbar=True, colorbar_label_skip=None, ptype=0, negative_linestyle='solid', blockfill=False, zero_thick=False, colorbar_shrink=None, colorbar_orientation=None, colorbar_position=None, xlog=False, ylog=False, axes=True, xaxis=True, yaxis=True, xticks=None, xticklabels=None, yticks=None, yticklabels=None, xlabel=None, ylabel=None, colors='k', swap_axes=False, verbose=None, linewidths=None, alpha=1.0, colorbar_text_up_down=False, colorbar_fontsize=None, colorbar_fontweight=None, colorbar_text_down_up=False, colorbar_drawedges=True, colorbar_fraction=None, colorbar_thick=None, colorbar_anchor=None, colorbar_labels=None, linestyles=None, zorder=1, level_spacing=None, irregular=None, face_lons=False, face_lats=False, face_connectivity=False, titles=False, mytest=False, transform_first=None, blockfill_fast=None, nlevs=False, orca=None, orca_skip=None, grid=False)[source]#
-
con is the interface to contouring in cf-plot. The minimum use is con(f)
+
The interface to contouring in cf-plot.
+

+
The minimum use is con(f)
where f is a 2 dimensional array. If a cf field is passed then an
appropriate plot will be produced i.e. a longitude-latitude or
latitude-height plot for example. If a 2d numeric array is passed then
@@ -91,38 +371,46 @@

Navigation

colorbar_fontsize=None - text size for colorbar labels and title
colorbar_fontweight=None - font weight for colorbar labels and title
-
colorbar_text_up_down=False - if True horizontal colour bar labels alternate
+
colorbar_text_up_down=False - if True horizontal colour bar labels
-
above (start) and below the colour bar
+
alternate above (start) and below the
+
colour bar
-
colorbar_text_down_up=False - if True horizontal colour bar labels alternate
+
colorbar_text_down_up=False - if True horizontal colour bar labels
-
below (start) and above the colour bar
+
alternate below (start) and above the
+
colour bar
colorbar_drawedges=True - draw internal divisions in the colorbar
-
colorbar_fraction=None - space for the colorbar - default = 0.21, in normalised
+
colorbar_fraction=None - space for the colorbar - default = 0.21,
+
+
in normalised
+
coordinates
-
colorbar_thick=None - thickness of the colorbar - default = 0.015, in normalised
+
colorbar_thick=None - thickness of the colorbar - default = 0.015,
-
coordinates
+
in normalised coordinates
-
colorbar_anchor=None - default=0.5 - anchor point of colorbar within the fraction space.
+
colorbar_anchor=None - default=0.5 - anchor point of colorbar within
+
the fraction space.
0.0 = close to plot, 1.0 = further away
-
colorbar_labels=None - labels to use for colorbar. The default is to use the contour
+
colorbar_labels=None - labels to use for colorbar. The default is to
-
levels as labels
+
use the contour levels as labels
colorbar_text_up_down=False - on a horizontal colorbar alternate the
-
labels top and bottom starting in the up position
+
labels top and bottom starting in the
+
up position
colorbar_text_down_up=False - on a horizontal colorbar alternate the
-
labels bottom and top starting in the bottom position
+
labels bottom and top starting in the
+
bottom position
colorbar_drawedges=True - draw internal delimeter lines in the colorbar
colors='k' - contour line colors - takes one or many values.
@@ -149,38 +437,48 @@

Navigation

linestyles=None - takes 'solid', 'dashed', 'dashdot' or 'dotted'
alpha=1.0 - transparency setting. The default is no transparency.
zorder=1 - order of drawing
-
level_spacing=None - Default of 'linear' level spacing. Also takes 'log', 'loglike',
+
level_spacing=None - Default of 'linear' level spacing. Also takes
-
'outlier' and 'inspect'
+
'log', 'loglike', 'outlier' and 'inspect'
irregular=None - flag for contouring irregular data
face_lons=None - longitude points for face vertices
face_lats=None - latitude points for face verticies
face_connectivity=None - connectivity for face verticies
titles=False - set to True to have a dimensions title
-
transform_first=None - Cartopy should transform the points before calling the contouring algorithm,
+
transform_first=None - Cartopy should transform the points before
-
which can have a significant impact on speed (it is much faster to transform
-
points than it is to transform patches) If this is unset and the number of points
-
in the x direction is > 400 then it is set to True.
+
calling the contouring algorithm, which can have
+
a significant impact on speed (it is much
+
faster to transform points than it is to
+
transform patches) If this is unset and the
+
number of points in the x direction is > 400
+
then it is set to True.
-
blockfill_fast=None - Use pcolormesh blockfill. This is possibly less reliable that the usual code but is
+
blockfill_fast=None - Use pcolormesh blockfill. This is possibly less
+
reliable that the usual code but is
faster for higher resolution datasets
nlevs=False - Let Matplotlib work out the levels for the contour plot
-
orca=None - User specifies this is an orca tripolar grid. Internally cf-plot tries to detect this by looking
+
orca=None - User specifies this is an orca tripolar grid. Internally
-
for a single discontinuity in the logitude 2D array. If found a fix it make to the longitudes so
-
that they are no longer discontinuous.
+
cf-plot tries to detect this by looking for a single
+
discontinuity in the logitude 2D array. If found a fix
+
it make to the longitudes so that they are no longer
+
discontinuous.
-
orca_skip=None - Only plot every nth grid point in the 2D longitude and latitude arrays. This is useful for when
+
orca_skip=None - Only plot every nth grid point in the 2D longitude
-
plotting his resolution data over the whole globe which would otherwise be very slow to visualize.
+
and latitude arrays. This is useful for when
+
plotting his resolution data over the whole globe
+
which would otherwise be very slow to visualize.
-
grid=False - Draw a grid on the map using the parameters set by cfp.setvars. Defaults are grid_x_spacing=60,
+
grid=False - Draw a grid on the map using the parameters set by
-
grid_y_spacing=30, grid_colour='k', grid_linestyle = '--', grid_thickness=1.0
+
cfp.setvars. Defaults are grid_x_spacing=60,
+
grid_y_spacing=30, grid_colour='k',
+
grid_linestyle = '--', grid_thickness=1.0

@@ -194,43 +492,100 @@

Navigation

-
-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cscale.html b/docs/build/cscale.html index f5767d7..0a54d22 100644 --- a/docs/build/cscale.html +++ b/docs/build/cscale.html @@ -1,49 +1,325 @@ + - + + + cscale — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

cscale

+

cscale#

-cfplot.cscale(scale=None, ncols=None, white=None, below=None, above=None, reverse=False, uniform=False)[source]
+cfplot.cscale(scale=None, ncols=None, white=None, below=None, above=None, reverse=False, uniform=False)[source]#
-
cscale - choose and manipulate colour maps. Around 200 colour scales are
-
-
available - see the gallery section for more details.
+
Choose and manipulate colour maps. Around 200 colour scales are
+
available (see the gallery section for more details).

-
scale=None - name of colour map
ncols=None - number of colours for colour map
white=None - change these colours to be white
@@ -79,54 +355,105 @@

Navigation

None

-
-

-

-

-

-
-
-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cscale_get_map.html b/docs/build/cscale_get_map.html index 6a69902..0e28216 100644 --- a/docs/build/cscale_get_map.html +++ b/docs/build/cscale_get_map.html @@ -1,75 +1,251 @@ + - + + + cscale_get_map — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

cscale_get_map

-
-
-cfplot.cscale_get_map()[source]
-
-
cscale_get_map - return colour map for use in contour plots.
-
-
This depends on the colour bar extensions
-
-
This is an internal routine and is not used by the user.
-

-

-
-
-
Returns:
-

colour map

-
-
-
-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

cscale_get_map#

+
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/cylindrical.html b/docs/build/cylindrical.html index 293941c..aab54c0 100644 --- a/docs/build/cylindrical.html +++ b/docs/build/cylindrical.html @@ -1,43 +1,324 @@ + - + + + Cylindrical projection — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

Cylindrical projection

+

Cylindrical projection#

-

Example 1 - basic cylindrical projection

-_images/fig1.png +

Example 1 - basic cylindrical projection#

+_images/fig1.png +
import cf
 import cfplot as cfp
 f=cf.read('cfplot_data/tas_A1.nc')[0]
@@ -50,8 +331,9 @@ 

Example 1 - basic cylindrical projection -

Example 2 - cylindrical projection with blockfill

-_images/fig2.png +

Example 2 - cylindrical projection with blockfill#

+_images/fig2.png +
import cf
 import cfplot as cfp
 f=cf.read('cfplot_data/tas_A1.nc')[0]
@@ -64,8 +346,9 @@ 

Example 2 - cylindrical projection with blockfill

-

Example 3 - altering the map limits and contour levels

-_images/fig3.png +

Example 3 - altering the map limits and contour levels#

+_images/fig3.png +
import cf
 import cfplot as cfp
 f=cf.read('cfplot_data/tas_A1.nc')[0]
@@ -78,43 +361,102 @@ 

Example 3 - altering the map limits and contour levels -
-

-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/download.html b/docs/build/download.html index 1ef939b..60a1d5d 100644 --- a/docs/build/download.html +++ b/docs/build/download.html @@ -1,43 +1,323 @@ + - + + + Download/Install — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

Download/Install

+

Download/Install#

The following notes refer to the Python 3 versions of cf-python and cf-plot which was released on 1st October 2019.

-

Is cf-plot already installed?

+

Is cf-plot already installed?#

Jasmin
export PATH=/home/users/ajh/anaconda3/bin:$PATH
@@ -60,9 +340,9 @@

Is cf-plot already installed? -

To install cf-plot

+

To install cf-plot#

-

Linux and Mac

+

Linux and Mac#

To install cf-plot on your own Linux PC or Mac download and install miniconda. On the command line type:

conda install -c ncas -c conda-forge cf-python cf-plot udunits2
 conda install -c conda-forge mpich esmpy
@@ -72,7 +352,7 @@ 

Linux and Mac -

Windows

+

Windows#

We have a small development team and Linux is our main working environment. Windows isn't an option for us at present given our target user base.

If you have a Windows operating system there are a couple of options for running Linux:

    @@ -81,7 +361,7 @@

    Windows

-

Other install methods for Linux and Mac OSX

+

Other install methods for Linux and Mac OSX#

Using pip:

pip install cf-python cf-plot
 
@@ -97,7 +377,7 @@

Other install methods for Linux and Mac OSXcf-python to use cf-plot. Other cf-plot dependencies are: Numpy, Scipy, Matplotlib, NetCDF4 and Cartopy.

-

Sample data sets

+

Sample data sets#

These are available in the cfplot_data directory which can be linked using:

Jasmin: ln -s /home/users/ajh/cfplot_data ~
@@ -119,43 +399,107 @@

Sample data sets

-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/find_pos_in_array.html b/docs/build/find_pos_in_array.html index 64fa51b..c7f5a36 100644 --- a/docs/build/find_pos_in_array.html +++ b/docs/build/find_pos_in_array.html @@ -1,54 +1,327 @@ + - + + + find_pos_in_array — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+
-

find_pos_in_array

+

find_pos_in_array#

-cfplot.find_pos_in_array(vals=None, val=None, above=False)[source]
+cfplot.find_pos_in_array(vals=None, val=None, above=False)[source]#
-
find_pos_in_array - find the position of a point in an array
+
Find the position of a point in an array.

vals - array values
val - value to find position of

-

-

-

-

-

Returns:
@@ -57,51 +330,106 @@

find_pos_in_array

-

-

-
-
-
-
-
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/fix_floats.html b/docs/build/fix_floats.html index 8149579..8464688 100644 --- a/docs/build/fix_floats.html +++ b/docs/build/fix_floats.html @@ -1,59 +1,251 @@ + - + + + fix_floats — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

fix_floats

-
-
-cfplot.fix_floats(data)[source]
-
-
fix_floats fixes numpy rounding issues where 0.4 becomes
-
0.399999999999999999999
-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + +
+ +
+

fix_floats#

+
+
+cfplot.fix_floats(data)[source]#
+

Fixes numpy rounding issues where 0.4 becomes 0.399999999999999999999.

+
+ +
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+ + +
\ No newline at end of file diff --git a/docs/build/gallery.html b/docs/build/gallery.html index 5a61ccf..26333e8 100644 --- a/docs/build/gallery.html +++ b/docs/build/gallery.html @@ -1,79 +1,253 @@ + - + + + cf-plot gallery — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
- + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+
- +
+ + + + + + + + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+ + +
\ No newline at end of file diff --git a/docs/build/gclose.html b/docs/build/gclose.html index 8461c4f..ed340e9 100644 --- a/docs/build/gclose.html +++ b/docs/build/gclose.html @@ -1,77 +1,251 @@ + - + + + gclose — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- -
-

gclose

-
-
-cfplot.gclose(view=True)[source]
-
-
gclose saves a graphics file. The default is to view the file as well
-
- use view = False to turn this off.
-
-
-
view = True - view graphics file
-
-
-
Returns:
-

None

-
-
-
-

-

-

-

-

-

-

-

-

+ + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+
-
+ -
+ +
+ + + + +
+
+ + + +
+ + + + -
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +
+

gclose#

+
+
+cfplot.gclose(view=True)[source]#
+
+
Saves a graphics file. The default is to view the file as well
+
but view=False can be used to turn this off.
+
+
+
view = True - view graphics file
+
+
+
Returns:
+

None

+
+
+
+ +
+ + +
+ + + + + +
+ +
+
+
+ +
+ + + +
+ + +
+
+ +
+ +
- + + + + + +
+
\ No newline at end of file diff --git a/docs/build/genindex.html b/docs/build/genindex.html index ee8abf5..fb4af73 100644 --- a/docs/build/genindex.html +++ b/docs/build/genindex.html @@ -1,43 +1,292 @@ + - + + + Index — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
-
-
-
- + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + + + Ctrl+K +
+
+ +
+ +
+ + + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+

Index

A - | B | C | F | G @@ -65,38 +314,20 @@

A

Name

Scale

-

B

- - -
-

C

@@ -125,8 +356,6 @@

G

  • gpos() (in module cfplot)
  • gset() (in module cfplot) -
  • -
  • gvals() (in module cfplot)
  • @@ -146,14 +375,10 @@

    L

    M

    @@ -171,14 +396,10 @@

    P

    @@ -186,8 +407,6 @@

    P

    R

    @@ -202,8 +421,6 @@

    R

    S

    @@ -241,43 +456,74 @@

    V

    -
    +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    -
    -
    - -
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/gopen.html b/docs/build/gopen.html index 957ce26..c3ddf45 100644 --- a/docs/build/gopen.html +++ b/docs/build/gopen.html @@ -1,45 +1,323 @@ + - + + + gopen — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    gopen

    +

    gopen#

    -cfplot.gopen(rows=1, columns=1, user_plot=1, file='cfplot.png', orientation='landscape', figsize=[11.7, 8.3], left=None, right=None, top=None, bottom=None, wspace=None, hspace=None, dpi=None, user_position=False)[source]
    +cfplot.gopen(rows=1, columns=1, user_plot=1, file='cfplot.png', orientation='landscape', figsize=[11.7, 8.3], left=None, right=None, top=None, bottom=None, wspace=None, hspace=None, dpi=None, user_position=False)[source]#
    -
    gopen is used to open a graphic file.
    +
    Open a graphic file.

    rows=1 - number of plot rows on the page
    columns=1 - number of plot columns on the page
    @@ -51,8 +329,14 @@

    Navigation

    right=None - right margin in normalised coordinates - default=0.92
    top=None - top margin in normalised coordinates - default=0.08
    bottom=None - bottom margin in normalised coordinates - default=0.08
    -
    wspace=None - width reserved for blank space between subplots - default=0.2
    -
    hspace=None - height reserved for white space between subplots - default=0.2
    +
    wspace=None - width reserved for blank space between
    +
    +
    subplots - default=0.2
    +
    +
    hspace=None - height reserved for white space between
    +
    +
    subplots - default=0.2
    +
    dpi=None - resolution in dots per inch
    user_position=False - set to True to supply plot position via gpos
    @@ -64,55 +348,105 @@

    Navigation

    None

    -
    -

    -

    -

    -

    -

    -
    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/gpos.html b/docs/build/gpos.html index f0cb1cc..506c2d9 100644 --- a/docs/build/gpos.html +++ b/docs/build/gpos.html @@ -1,43 +1,321 @@ + - + + + gpos — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    gpos

    +

    gpos#

    -cfplot.gpos(pos=1, xmin=None, xmax=None, ymin=None, ymax=None)[source]
    +cfplot.gpos(pos=1, xmin=None, xmax=None, ymin=None, ymax=None)[source]#
    Set plot position. Plots start at top left and increase by one each plot
    to the right. When the end of the row has been reached then the next
    @@ -54,65 +332,111 @@

    Navigation

    ymin=None ymin in normalised coordinates
    ymax=None ymax in normalised coordinates

    -

    Returns:

    None

    -
    -

    -

    -

    -

    -

    -

    -

    -

    -
    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/graphs.html b/docs/build/graphs.html index 498c861..b491e75 100644 --- a/docs/build/graphs.html +++ b/docs/build/graphs.html @@ -1,43 +1,324 @@ + - + + + Graphs — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Graphs

    +

    Graphs#

    -

    Example 27 - graph plot

    -_images/fig27.png +

    Example 27 - graph plot#

    +_images/fig27.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -72,8 +353,9 @@ 

    Example 27 - graph plot

    -

    Example 28 - Line and legend plot

    -_images/fig28.png +

    Example 28 - Line and legend plot#

    +_images/fig28.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -139,8 +421,9 @@ 

    Example 28 - Line and legend plot -

    Example 29 - Global average annual temperature

    -_images/fig29.png +

    Example 29 - Global average annual temperature#

    +_images/fig29.png +

    In this example we subset a time data series of global temperature, area mean the data, convert to Celsius and plot a linegraph.

    When using gset to set the limits on the plotting axes and a time axis pass time strings to give the limits i.e. cfp.gset(xmin = '1980-1-1', xmax = '1990-1-1', ymin = 285, ymax = 295)

    @@ -157,8 +440,9 @@

    Example 29 - Global average annual temperature -

    Example 30 - Two axis plotting

    -_images/fig30.png +

    Example 30 - Two axis plotting#

    +_images/fig30.png +

    In this example we plot two x-axes, one with zonal mean zonal wind data and one with temperature data. Somewhat confusingly the option for a twin x-axis is twiny=True. This is a Matplotlib keyword which has been adopted within the cf-plot code.

    import cf
    @@ -190,43 +474,103 @@ 

    Example 30 - Two axis plotting

    -
    -
    -
    -
    + + + + + +
    + +
    +
    +
    + +
    + + + + -
    + + + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/gset.html b/docs/build/gset.html index 7ebc8f7..72245b5 100644 --- a/docs/build/gset.html +++ b/docs/build/gset.html @@ -1,45 +1,323 @@ + - + + + gset — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    gset

    +

    gset#

    -cfplot.gset(xmin=None, xmax=None, ymin=None, ymax=None, xlog=False, ylog=False, user_gset=1, twinx=None, twiny=None)[source]
    +cfplot.gset(xmin=None, xmax=None, ymin=None, ymax=None, xlog=False, ylog=False, user_gset=1, twinx=None, twiny=None)[source]#
    -
    Set plot limits for all non longitude-latitide plots.
    +
    Set plot limits for all non-longitude-latitide plots.
    xmin, xmax, ymin, ymax are all needed to set the plot limits.
    Set xlog/ylog to True or 1 to get a log axis.

    @@ -71,54 +349,105 @@

    Navigation

    None

    -
    -

    -

    -

    -

    -
    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/gvals.html b/docs/build/gvals.html index 057054a..17f09a8 100644 --- a/docs/build/gvals.html +++ b/docs/build/gvals.html @@ -1,71 +1,251 @@ + - + + + gvals — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    gvals

    -
    -
    -cfplot.gvals(dmin=None, dmax=None, mystep=None, mod=True)[source]
    -
    -
    gvals - work out a sensible set of values between two limits
    -
    This is an internal routine used for contour levels and axis
    -
    labelling and is not generally used by the user.
    -
    -
    -
    dmin = None - minimum
    -
    dmax = None - maximum
    -
    mystep = None - use this step
    -
    mod = True - modify data to make use of a multipler
    -

    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    gvals#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/hovmuller.html b/docs/build/hovmuller.html index da293f1..8a362fd 100644 --- a/docs/build/hovmuller.html +++ b/docs/build/hovmuller.html @@ -1,43 +1,324 @@ + - + + + Hovmuller plots — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Hovmuller plots

    +

    Hovmuller plots#

    -

    Example 10 - latitude-time

    -_images/fig10.png +

    Example 10 - latitude-time#

    +_images/fig10.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -51,8 +332,9 @@ 

    Example 10 - latitude-time -

    Example 11 - latitude-time subset

    -_images/fig11.png +

    Example 11 - latitude-time subset#

    +_images/fig11.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -72,8 +354,9 @@ 

    Example 11 - latitude-time subset -

    Example 12 - longitude-time plot

    -_images/fig12.png +

    Example 12 - longitude-time plot#

    +_images/fig12.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -86,43 +369,102 @@ 

    Example 12 - longitude-time plot

    -
    -
    -
    -
    + + + + + +
    + +
    +
    +
    + +
    + + + + -
    + + + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/index.html b/docs/build/index.html index 3428f5c..48e6eaf 100644 --- a/docs/build/index.html +++ b/docs/build/index.html @@ -1,44 +1,299 @@ + - + + + cf-plot documentation — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    + + + + + +
    +
    -

    cf-plot documentation

    +

    cf-plot documentation#

    cf-plot: code-light plotting for earth science and aligned research

    -

    Overview

    -_images/cf_gallery_image.png +

    Overview#

    +_images/cf_gallery_image.png +

    cf-plot allows you to produce and customise publication-quality contour, vector, line and more plots with the power of Python, matplotlib, Cartopy and cf-python in as few lines of code as possible.

    @@ -47,7 +302,7 @@

    Overview cf-plot is developed and maintained by the NCAS-CMS group, part of NCAS.

    -

    Brief Demonstration

    +

    Brief Demonstration#

    In as little as four lines of Python including imports and file reading, using cf-plot you can for example produce a contour plot showing a 2D subspace of a netCDF dataset:

    @@ -59,14 +314,14 @@

    Brief Demonstration -

    Examples Gallery

    +

    Examples Gallery#

    A gallery of outputs made with cf-plot, showcasing a range of plotting possibilities with links to relevant documentation pages and to example code, can be found on the gallery page, as also linked to the static image of the gallery at the to of this page.

    -

    Installation

    +

    Installation#

    To install cf-plot with its required dependencies, you can use pip:

    pip install cf-python cf-plot
     
    @@ -80,55 +335,117 @@

    Installationinstallation page of the documentation.

    -

    Contributing

    +

    Contributing#

    Everyone is welcome to contribute to cf-plot in the form of bug reports, documentation, code, design proposals, and more.

    Contributing guidelines will be added to the repository shortly.

    -

    Help: Issues, Questions, Feature Requests, etc.

    +

    Help: Issues, Questions, Feature Requests, etc.#

    For any queries, see the guidance page here.

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/internal_routines.html b/docs/build/internal_routines.html index 9995124..97fbba0 100644 --- a/docs/build/internal_routines.html +++ b/docs/build/internal_routines.html @@ -1,40 +1,320 @@ + - + + + Internal routines — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/issues.html b/docs/build/issues.html index 5595f1a..d0f3552 100644 --- a/docs/build/issues.html +++ b/docs/build/issues.html @@ -1,40 +1,320 @@ + - + + + cf-plot issues — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    cf-plot issues

    +

    cf-plot issues#

    If you find a problem with cf-plot please email Sadie Bartholomew (sadie.bartholomew@ncas.ac.uk) with the following:

    (i) the cf-python and cf-plot version numbers used:
    @@ -89,43 +369,88 @@

    cf-plot issues

    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/levs.html b/docs/build/levs.html index 0d6aec6..0521335 100644 --- a/docs/build/levs.html +++ b/docs/build/levs.html @@ -1,45 +1,323 @@ + - + + + levs — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    levs

    +

    levs#

    -cfplot.levs(min=None, max=None, step=None, manual=None, extend='both')[source]
    +cfplot.levs(min=None, max=None, step=None, manual=None, extend='both')[source]#
    -
    The levs command manually sets the contour levels.
    +
    Manually sets the contour levels.
    min=min - minimum level
    @@ -51,12 +329,12 @@

    Navigation

    Use the levs command when a predefined set of levels is required. The
    min, max and step parameters can be used to define a set of levels.
    -
    These can take integer or floating point numbers. If the min and max are specified
    -
    then a step also needs to be specified.
    +
    These can take integer or floating point numbers. If the min and max
    +
    are specified then a step also needs to be specified.
    -
    If just the step is specified then cf-plot will internally try to define a reasonable set
    -
    of levels.
    +
    If just the step is specified then cf-plot will internally try to
    +
    define a reasonable set of levels.
    If colour filled contours are plotted then the default is to extend
    @@ -78,43 +356,100 @@

    Navigation

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/license.html b/docs/build/license.html index eae76eb..166bc22 100644 --- a/docs/build/license.html +++ b/docs/build/license.html @@ -1,62 +1,253 @@ + - + + + License — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    License

    -

    Copyright (c) Sadie Bartholomew (NCAS) 2024

    -

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    -

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    -
    -

    -

    -

    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + + +
    + + + + +
    +
    + + + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    License#

    +

    Copyright (c) Sadie Bartholomew (NCAS) 2024

    +

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    +

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    +
    +

    +

    +

    +

    +

    +

    +

    +

    +
    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/lineplot.html b/docs/build/lineplot.html index 6791cf8..100e09f 100644 --- a/docs/build/lineplot.html +++ b/docs/build/lineplot.html @@ -1,45 +1,324 @@ + - + + + lineplot — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    lineplot

    +

    lineplot#

    -cfplot.lineplot(f=None, x=None, y=None, fill=True, lines=True, line_labels=True, title=None, ptype=0, linestyle='-', linewidth=1.0, color=None, xlog=False, ylog=False, verbose=None, swap_xy=False, marker=None, markersize=5.0, markeredgecolor='k', markeredgewidth=0.5, label=None, legend_location='upper right', xunits=None, yunits=None, xlabel=None, ylabel=None, xticks=None, yticks=None, xticklabels=None, yticklabels=None, xname=None, yname=None, axes=True, xaxis=True, yaxis=True, titles=False, zorder=None)[source]
    +cfplot.lineplot(f=None, x=None, y=None, fill=True, lines=True, line_labels=True, title=None, ptype=0, linestyle='-', linewidth=1.0, color=None, xlog=False, ylog=False, verbose=None, swap_xy=False, marker=None, markersize=5.0, markeredgecolor='k', markeredgewidth=0.5, label=None, legend_location='upper right', xunits=None, yunits=None, xlabel=None, ylabel=None, xticks=None, yticks=None, xticklabels=None, yticklabels=None, xname=None, yname=None, axes=True, xaxis=True, yaxis=True, titles=False, zorder=None)[source]#
    -
    lineplot is the interface to line plotting in cf-plot.
    +
    The interface to line plotting in cf-plot.
    +

    The minimum use is lineplot(f) where f is a CF field.
    If x and y are passed then an appropriate plot is made allowing
    x vs data and y vs data plots.
    @@ -53,7 +332,10 @@

    Navigation

    x - x locations of data in y
    y - y locations of data in x
    linestyle='-' - line style
    -
    color=None - line color. Defaults to Matplotlib colour scheme unless specified
    +
    color=None - line color. Defaults to Matplotlib colour scheme
    +
    +
    unless specified
    +
    linewidth=1.0 - line width
    marker=None - marker for points along the line
    markersize=5.0 - size of the marker
    @@ -64,11 +346,14 @@

    Navigation

    label=None - line label - label for line
    legend_location='upper right' - default location of legend
    -
    Other options are {'best': 0, 'center': 10, 'center left': 6,
    +
    Other options are {'best': 0, 'center': 10,
    +
    'center left': 6,
    'center right': 7, 'lower center': 8,
    -
    'lower left': 3, 'lower right': 4, 'right': 5,
    -
    'upper center': 9, 'upper left': 2, 'upper right': 1}
    +
    'lower left': 3, 'lower right': 4,
    +
    'right': 5,
    +
    'upper center': 9, 'upper left': 2,
    +
    'upper right': 1}
    titles=False - set to True to have a dimensions title
    @@ -84,8 +369,8 @@

    Navigation

    yunits=None - y units
    xlabel=None - x name
    ylabel=None - y name
    -
    xname=None - depreciated keyword
    -
    yname=None - depreciated keyword
    +
    xname=None - deprecated keyword
    +
    yname=None - deprecated keyword
    xticks=None - x ticks
    xticklabels=None - x tick labels
    yticks=None - y ticks
    @@ -101,7 +386,6 @@

    Navigation

    axis overrides should be placed in.

    -

    @@ -109,43 +393,100 @@

    Navigation

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/map_title.html b/docs/build/map_title.html index 7ff4e8f..0107d54 100644 --- a/docs/build/map_title.html +++ b/docs/build/map_title.html @@ -1,65 +1,251 @@ + - + + + map_title — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    map_title

    -
    -
    -cfplot.map_title(title=None, dims=False)[source]
    -
    -
    map_title is an internal routine to draw a title on a map plot
    -

    -
    title=None - title to put on map plot
    -
    dim=False - draw a set of dimension titles
    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    +
    - +
    + + + + + +
    + +
    +

    map_title#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    + + +
    \ No newline at end of file diff --git a/docs/build/mapaxis.html b/docs/build/mapaxis.html index 5eb39ba..5a8bffd 100644 --- a/docs/build/mapaxis.html +++ b/docs/build/mapaxis.html @@ -1,78 +1,251 @@ + - + + + mapaxis — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    mapaxis

    -
    -
    -cfplot.mapaxis(min=None, max=None, type=None)[source]
    -
    -
    mapaxis is used to work out a sensible set of longitude and latitude
    -
    tick marks and labels. This is an internal routine and is not used
    -
    by the user.
    -
    -
    -
    min=None - minimum axis value
    -
    max=None - maximum axis value
    -
    type=None - 1 = longitude, 2 = latitude
    -
    -
    -
    Returns:
    -

    longtitude/latitude ticks and longitude/latitude tick labels

    -
    -
    -
    -

    -

    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    mapaxis#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/mapset.html b/docs/build/mapset.html index 70bcd23..0f6636f 100644 --- a/docs/build/mapset.html +++ b/docs/build/mapset.html @@ -1,45 +1,323 @@ + - + + + mapset — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    mapset

    +

    mapset#

    -cfplot.mapset(lonmin=None, lonmax=None, latmin=None, latmax=None, proj='cyl', boundinglat=0, lon_0=0, lat_0=40, resolution='110m', user_mapset=1, aspect=None)[source]
    +cfplot.mapset(lonmin=None, lonmax=None, latmin=None, latmax=None, proj='cyl', boundinglat=0, lon_0=0, lat_0=40, resolution='110m', user_mapset=1, aspect=None)[source]#
    -
    mapset sets the mapping parameters.
    +
    Sets the mapping parameters.

    lonmin=lonmin - minimum longitude
    lonmax=lonmax - maximum longitude
    @@ -86,8 +364,9 @@

    Navigation

    The default setting for the cylindrical projection is for 1 degree of
    longitude to have the same size as one degree of latitude. When plotting
    a smaller map setting aspect='auto' turns this off and the map fills the
    -
    plot area. Setting aspect to a number a circle will be stretched such that
    -
    the height is num times the width. aspect=1 is the same as aspect='equal'.
    +
    plot area. Setting aspect to a number a circle will be stretched such
    +
    that the height is num times the width. aspect=1 is the same as
    +
    aspect='equal'.

    The proj parameter accepts 'npstere' and 'spstere' for northern
    hemisphere or southern hemisphere polar stereographic projections.
    @@ -109,43 +388,100 @@

    Navigation

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/max_ndecs_data.html b/docs/build/max_ndecs_data.html index 36b79a1..f072c97 100644 --- a/docs/build/max_ndecs_data.html +++ b/docs/build/max_ndecs_data.html @@ -1,54 +1,251 @@ + - + + + max_ndecs_data — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    max_ndecs_data

    -
    -
    -cfplot.max_ndecs_data(data)[source]
    -
    + + + + + + + -
    + + + + +
    + + + + + + + + + +
    +
    +
    +
    +
    -
    -
    +
    + +
    + + + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    max_ndecs_data#

    +
    +
    +cfplot.max_ndecs_data(data)[source]#
    +

    TODO DOCS.

    +
    + +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/multiple_plots.html b/docs/build/multiple_plots.html index 4987164..ec10e95 100644 --- a/docs/build/multiple_plots.html +++ b/docs/build/multiple_plots.html @@ -1,44 +1,325 @@ + - + + + Multiple plots — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Multiple plots

    +

    Multiple plots#

    -

    Example 19 - multiple plots

    +

    Example 19 - multiple plots#

    Plots are arranged over rows and columns with the first plot at the top left and the last plot is the bottom right. Here the margin at the bottom of the plot is increased with the bottom parameter to gopen to accomodate a unified colorbar. The colorbars are turned off for all plots apart from the last one.

    -_images/fig19.png +_images/fig19.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -60,12 +341,13 @@ 

    Example 19 - multiple plots -

    Example 19a - multiple plots - user specified plot positions

    +

    Example 19a - multiple plots - user specified plot positions#

    User specified plot limits are set by first specifying the user_position=True parameter to gopen and then the plot position to the gpos routines. The xmin, xmax, ymin, ymax paramenters for the plot display area are in normalised coordinates.

    Cylidrical projection plots have an additional rider of having a degree in longitude and latitude being the same size so plots of this type might not fill the plot area specified as expected.

    -_images/fig19a.png +_images/fig19a.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -85,11 +367,12 @@ 

    Example 19a - multiple plots - user specified plot positions -

    Example 19b - user specified plot position to accomodate more than one color bar

    +

    Example 19b - user specified plot position to accomodate more than one color bar#

    The plot position on the page is set manually with the user_position=True parameter to cfp.gopen and then passing the required plot size to cfp.gpos. Two calls to the cfp.cbar routine place colour bars on the plot.

    -_images/fig19b.png +_images/fig19b.png +
    import cf
     import cfplot as cfp
     import numpy as np
    @@ -118,43 +401,102 @@ 

    Example 19b - user specified plot position to accomodate more than one color

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/ndecs.html b/docs/build/ndecs.html index d00bec1..a0461a3 100644 --- a/docs/build/ndecs.html +++ b/docs/build/ndecs.html @@ -1,46 +1,324 @@ + - + + + ndecs — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    ndecs

    +

    ndecs#

    -cfplot.ndecs(data=None)[source]
    +cfplot.ndecs(data=None)[source]#
    -
    ndecs finds the number of decimal places in an array. Needed to make the
    -
    colour bar match the contour line labelling.
    +
    Finds the number of decimal places in an array.
    +
    Needed to make the colour bar match the contour line labelling.
    data=data - input array of values
    @@ -52,56 +330,106 @@

    ndecs
    maximum number of necimal places

    -

    -

    -

    -

    -

    -

    -

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/objects.inv b/docs/build/objects.inv index 9ef9385bc506bd1893bd7acf9fbef743e4f78d30..0876a4fbfddaa42b3b152752b879b0ea72e28921 100644 GIT binary patch delta 2039 zcmVQKC&PZ%ca64Sp+Fd zf1kk{GXO=Otexp@G(bECaCsQoemZAWRg|w~+mzYx`r$Bl<<#_Dw#$6t{5YN3vtP39 zrZk)vE+`s8Nn9cSN`O^7Vw9{c=ax;pX!$d5X)81x^B>trIe!p}afjlWjYY>!oWgx3 zW&whr`z}Tauo=m!V1zw1T~!RdD4MQdgFjo|t4d9N|xFh#lx)0{c>Q6)#0mv57^T zFd1=GicnN6LVphN#2QjFYv@~;nj^1g`ENZo6=g+$NCT2FPX`m&c%W1)M%IZvK?fr& z@L`2fu!+X#sTqc7Ihp7Z8kS7cMJoa)6Wo!rQ^b+M2s@4Ji6CVt!aehn4xkLhxVESJ zuMBw{D@!f}*r`6W?2)(Gc9+e9!$+Q*%8kSKBOf_zVSih-9vYD~otRkL@+xCpl^y#Z z+0@%$)=ZmV_m|QYxY$NpzihsGW?cy~2&H2h^U)%{369~;FCu_jOc`KLshStI*2j+q zn0?H)*Tjo5ttrCb%cT_#yj@i$r;k_y@aHR_9uEzC?*O3!HX9wf0Wf*u zsyVz-XKe_z2d$K}IoC0I468k}ki%VfNCjn_UT|JxFgmOy^2p2o^llvjUDV`BvS~lY}U!gRp z#s+c-?8D{@1~|WpBf9rR1Y~E^5>@}BgUSr;rZ%SA{%n4|yVH9$rnn{%3EGQjaeWyy znSU-WVT6L362VbH3AkDwEhEx2A&syHkqK^0-5J7t(JA$O-gS|dr8V!sHh&=~6V*z0 z^3RQ~T*Jm(*(!Bh){Ee>R@Jj1-4?T9&XZB8TaRowVz!EC{ulLk2=X!>20{op*K2D_ z!OhB2Rd(3EE!(6!oAb@0qON{s_!Lk9%YQ!h&!<^_&=BE*8uf?6Xg8SSn#C+=oAUgp zHthso+0HJ=%qQMWOsy>_?fBTSwix?)f-8W)Y?8F|MTavRmMXrkSQ+)O2H7-1%%n{f z!IpJwqi#3>)Ln02lwHoXj4wY>obe7XCKJ*Mf9f9_cRNDB;A*6_0*r4jxM1&!RykXCdpllZ<$>>I=D)+RLYFZhzsKfQy% zRD>%7J%8dE@R!A@Nt?lxfvX}Ms;c1ASJPfJa(+N<=~N4i4xOWnF@&^JWIseP{mjO; z8c)>p6*X|+@24?9(ll2*dzZC+ zSL?sG4uloF_fP}uudDR(5?RRdGF8Q<^1cuL8iOe|Y`#E%YdX8(Mf9K#Sbso%g#`(} zR9DvUy}AM7r7T}Kpl={rOkCh)M{~B%=Bb1r{dd*RBPbngVm|AflD8A{Xc7w4;Y=TU zSUg;oXn4mB;~M**Bbh?#r5%yI3rasTk*&fewc?``pP&!+;1ryVA2~YlleSfGQ8$9#Fxby2G zF%8KhqPCo-u2=hrI>Uu;gc=m~d9-7Nac%Znh?LuzewX_8<>BsgEaTg!Lg3(SDQURk zaLFW&g1B)cWVv9Fas!OHco;(VnT%{Lc0o#wTV%qIrYp>4JX7(Fdb$lL?%fuqhRZo$ z_*M5=eU})~`%URz4S$j2Wgni^3N)~_j~~} zQMygLxTP*`7r6-+x75Y$n@aoh_bC?;#x5joi5t1FZ0BOXeZQi#OS{-n7rRAn!o`ld z*sUn-(=PVZ#eR{SaIvQ@_A5$x+C@%X0GpDmN4`ydtX_t1fqb_!f+=PoAb+KDf+NWLYsf+z0H{oJWUF=ts z^0bSby2ux~2^Tqak-w#ssu^sp(6UZeWFv1m6OtnTzdMB6|Llh1>Bo2oQ}9z~zCZk~ V{$JJsoMQ`-{{wD8{{tBk=Uy9xZ8_Clo9(jbcz2vm&Bb@w zc2mxr7d=umm_%G*J_%rJXN-r(x@id7+8DA_O?htAq>DyB>wkvop>EE9Py^+FiQ^uN zN=>Rz<5(YB%0Nzu`>ckdRVU4f-osf(UH)g|Qc`emPIv0npbIq&>XnTJaxQY~lRD@n zu5$`pHYA-e4kJtl8v<)wz!nER6(`k;9Peb@$GWYGz8j0Wb)6-2<`*Ko6pu}(rjb#- zgK-XJ(~Y!u&VR_UU9ahgSsO=!P6`AQ$Bmk9FJt1kXT>&&wJ{`Y7z#8dj;mWOY;JF6 zc$l$bswcJ(f?Z;$mwM!QW0lZ+ESyomz7%bx%Td~A*vYuoMJU$BkUifXy|h2fAG4qf z;b28R&g>dEMh1O2oBxNQt|*-Wc#NSd^*9z~*K|W+cYhcYAwXChXk-8oFp5c!YzI-d z$Y=VUQNZ%4wl+1j72OK3Q(>XwZpb_(1< zs}tiGBgdZmv84B)GcxQns3(FnCWd>~C7l{$;<%=xIfpStoGQ(t1L@U|je5{cw%ujt zQNuDm*MC(Qvwx3z&~Tw{?O6n;Mcs~*Y8qW-s;#nP_cfb3Z_MgxlVm(5bOkE5EZs59 zSI?>~Aq+w}o5OtYh%ckY@SqnFKrN>9aPn96i(2dBhZ&fC$hO(Xb{e|s?8XebX1e}5 z9lJKfd-&#fKS8{ElfATu%$|hLwaQ$c5Tcde9DnU+h-UZC&^>9ZZ?tpJ_4ad!Sgl2b z!8e;W9eBTAXP-+e2_WW_fO4s1f{1yfS%WlvOn_qUXxH$@W{oM-r;H|~_l1tpgc4$__wkU6f8sKwd49D3uj;k3b+3Y)0W zADgAgGR~4&ER-S}{41no)lh>Efunhz!2}m~F{4LaB!KCx9HQ#Jwva!g)70Bs+rP}; z-hXswHKv3n5eeF3G+qTHP0A$zj8KyKBY!wb`vG?_SIdB6&L)TO7tw6o%+)~(kEMZ$ z7yY4&w0Jn^7G&!ef|{)^(ns@gixvqWlj)@ppXHe*y)Q~aIiM?gQgWzxzVNlu zags47G>ci#Hs!_no7+jI&Mz78oKL!)l-)3p+v%ZIO)+%m32Lelvx(C$0%y*=*+hxS z!phX7iN&TK$1`cuTCiki+t`vZfrfe!MmhLG%eb0^j7zt8hs-7y;Scv^6Ut2lOlnOV zE5XF}SVbC3(IgnILmkSNpBNKrPk)CXt23!Lu|KGx6)7o2Q7l%68hlp?he7|k^$rL8 z6J`?n=Z*zficmAqONFn1KRwPa+6N+JpPN4ImsLYENT;{Pifpiv`lO@LXa05Ni`m@#c935?tN-1CP;@KHvam78XLp zt-7*@?`>I!w=#QWNjf1uv423H=a&_NjPvSVQ;<73#G*GSB~LB$8%rACkgoKhgUzE& z-i1%x)b6mKoF%hJx3w8Ls-X0X*|N1*F&4i{@eTUPU!0>>LwUpvI-3K2cK&-f9XBIS z!$+Kd`?n&D2oFUBku*pilT3YBKSFNZmaB*PXaC}4yYAngaD4xg6o1dzw|HK8@@Qo= zr9lK-dI^ZJ{VSJ5jZa**CHu04aN$|Y_}yz(>W@!Z;GYIno0}^|c$>rg?GYzfIzz1* z%n1XBSTJTH?}@bYl<0V3@sfu$^9>G;Zm986P3=K%uyEQNivtnQP&o~d_rckUPKng+ z+WV3s%@HDyW2=-7?SD!EjJQfeWky<0>~rg*xsGR~Ibb*!cR6KW7|YgU7ed)FVj|+m zg~Zp`Gi%@2_s)b89y?(sgD>d9Pod9t4mhHVoBkgMF&UVD*|nQzhOJFBr{6PrBHTCp zMze#tVDh3os+PR2P+xkBeIMT`ZBRduGbhWlndDn2cJFc_xPLMG2RX+yxFv2fsF-~* z8@9V`z7pw5R&hmDTrF}16<1Wn)k>smS;aL~alObDR9sUP*DH~3WED45#mypDP;o<5 z+^j^pl~vqQ6}O9ALB%aqak~=fPF8V8RopFd1r>Kx#oe2c_V0d>RDc<)Ft{ZyQ{mY` z#eVz4N~E2vVt+?f>=wC#iXBz4TZy!nRqUyX{UTRTv8O8bE0J_+Hlq2nA6+5b8x5yP#?5K*} zN~FE4Voz1<7rBCpJyo$^iImGKa;hR<_Yk~New_*|h;t;xs+-Dou$iusW^ mh5KKKA$j^bJf<%A>OB8``qloJ82~}ChnSy@J?MXvIk3pNpbVJ+ diff --git a/docs/build/older_documentation.html b/docs/build/older_documentation.html index 2301b4b..f9bbf38 100644 --- a/docs/build/older_documentation.html +++ b/docs/build/older_documentation.html @@ -1,40 +1,320 @@ + - + + + Older documentation — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/pcon.html b/docs/build/pcon.html index 3c52790..63c8d00 100644 --- a/docs/build/pcon.html +++ b/docs/build/pcon.html @@ -1,46 +1,324 @@ + - + + + pcon — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    pcon

    +

    pcon#

    -cfplot.pcon(mb=None, km=None, h=7.0, p0=1000)[source]
    +cfplot.pcon(mb=None, km=None, h=7.0, p0=1000)[source]#
    -
    pcon is a function for converting pressure to height in kilometers and
    -
    vice-versa. This function uses the equation P=P0exp(-z/H) to translate
    +
    Convert pressure to height in kilometers and vice-versa.
    +
    This function uses the equation P=P0exp(-z/H) to translate
    between pressure and height. In pcon the surface pressure P0 is set to
    1000.0mb and the scale height H is set to 7.0. The value of H can vary
    from 6.0 in the polar regions to 8.5 in the tropics as well as
    @@ -81,43 +359,100 @@

    pcon -
    -

    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/plot_map_axes.html b/docs/build/plot_map_axes.html index 64fd980..176e4ff 100644 --- a/docs/build/plot_map_axes.html +++ b/docs/build/plot_map_axes.html @@ -1,73 +1,251 @@ + - + + + plot_map_axes — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    plot_map_axes

    -
    -
    -cfplot.plot_map_axes(axes=None, xaxis=None, yaxis=None, xticks=None, xticklabels=None, yticks=None, yticklabels=None, user_xlabel=None, user_ylabel=None, verbose=None)[source]
    -
    -
    plot_map_axes is an internal routine to draw the axes on a map plot
    -

    -
    axes=None - drawing axes
    -
    xaxis=None - drawing x-axis
    -
    yaxis=None - drawing x-axis
    -
    xticks=None - user defined xticks
    -
    xticklabels=None - user defined xtick labels
    -
    yticks=None - user defined yticks
    -
    yticklabels=None - user defined ytick labels
    -
    user_xlabel=None - user defined xlabel
    -
    user_ylabel=None - user defined ylabel
    -
    verbose=None
    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    +
    - +
    + + + + + +
    + +
    +

    plot_map_axes#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    + + +
    \ No newline at end of file diff --git a/docs/build/polar.html b/docs/build/polar.html index 765b059..f7f7ccd 100644 --- a/docs/build/polar.html +++ b/docs/build/polar.html @@ -1,43 +1,324 @@ + - + + + Polar stereographic projection — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Polar stereographic projection

    +

    Polar stereographic projection#

    -

    Example 4 - north pole

    -_images/fig4.png +

    Example 4 - north pole#

    +_images/fig4.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -53,8 +334,9 @@ 

    Example 4 - north pole

    -

    Example 5 - south pole with 30 degrees south being the latitude plot limit

    -_images/fig5.png +

    Example 5 - south pole with 30 degrees south being the latitude plot limit#

    +_images/fig5.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -66,43 +348,101 @@ 

    Example 5 - south pole with 30 degrees south being the latitude plot limit -
    -

    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/polar_regular_grid.html b/docs/build/polar_regular_grid.html index 3c6930a..627a647 100644 --- a/docs/build/polar_regular_grid.html +++ b/docs/build/polar_regular_grid.html @@ -1,79 +1,251 @@ + - + + + polar_regular_grid — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    polar_regular_grid

    -
    -
    -cfplot.polar_regular_grid(pts=50)[source]
    -
    -
    polar_regular_grid - return a regular grid over a polar
    -
    -
    stereographic area
    -

    -
    -
    pts=50 - number of grid points in the x and y directions
    -

    -

    -

    -

    -

    -

    -
    -
    -
    Returns:
    -

    lons, lats of grid in degrees -x, y locations of lons and lats

    -
    -
    -
    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    +
    - +
    + + + + + +
    + +
    +

    polar_regular_grid#

    +
    +
    +cfplot.polar_regular_grid(pts=50)[source]#
    +
    +
    Return a regular grid over a polar stereographic area.
    +

    +
    pts=50 - number of grid points in the x and y directions
    +

    +
    +
    +
    Returns:
    +

    lons, lats of grid in degrees +x, y locations of lons and lats

    +
    +
    +
    + +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    +
    +
    + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/pressure.html b/docs/build/pressure.html index bc3f295..d0f585b 100644 --- a/docs/build/pressure.html +++ b/docs/build/pressure.html @@ -1,43 +1,324 @@ + - + + + Latitude / longitude - pressure — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Latitude / longitude - pressure

    +

    Latitude / longitude - pressure#

    -

    Example 6 - latitude - pressure

    -_images/fig6.png +

    Example 6 - latitude - pressure#

    +_images/fig6.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[2]
    @@ -52,8 +333,9 @@ 

    Example 6 - latitude - pressure -

    Example 7 - latitude - pressure - zonal mean

    -_images/fig7.png +

    Example 7 - latitude - pressure - zonal mean#

    +_images/fig7.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -68,8 +350,9 @@ 

    Example 7 - latitude - pressure - zonal mean -

    Example 8 - latitude - log pressure

    -_images/fig8.png +

    Example 8 - latitude - log pressure#

    +_images/fig8.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[1]
    @@ -78,8 +361,9 @@ 

    Example 8 - latitude - log pressure -

    Example 9 - longitude - pressure

    -_images/fig9.png +

    Example 9 - longitude - pressure#

    +_images/fig9.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ggap.nc')[0]
    @@ -90,43 +374,103 @@ 

    Example 9 - longitude - pressure

    -
    -
    -
    -
    + + + + + +
    + +
    +
    +
    + +
    + + + + -
    + + + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/process_color_scales.html b/docs/build/process_color_scales.html index 70793e4..4e89e9e 100644 --- a/docs/build/process_color_scales.html +++ b/docs/build/process_color_scales.html @@ -1,78 +1,251 @@ + - + + + process_color_scales — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    process_color_scales

    -
    -
    -cfplot.process_color_scales()[source]
    -
    -
    Process colour scales to generate images of them for the web
    -
    documentation and the rst code for inclusion in the
    -
    colour_scale.rst file.
    -

    -

    -
    No inputs
    -
    This is an internal routine and not used by the user
    -

    -

    -

    -

    -

    -
    -
    -
    Returns:
    -

    None

    -
    -
    -
    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    process_color_scales#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/projections.html b/docs/build/projections.html index 342e58c..69d117a 100644 --- a/docs/build/projections.html +++ b/docs/build/projections.html @@ -1,44 +1,325 @@ + - + + + Projections in cf-plot — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Projections in cf-plot

    +

    Projections in cf-plot#

    The cylindrical and polar stereographic projections are detailed separately in cylindrical plots <cylindrical> and polar plots <polar>.

    -

    Example 31 - UKCP projection

    -_images/fig31.png +

    Example 31 - UKCP projection#

    +_images/fig31.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ukcp_rcm_test.nc')[0]
    @@ -59,7 +340,7 @@ 

    Example 31 - UKCP projection -

    Example 32 - UKCP projection with blockfill

    +

    Example 32 - UKCP projection with blockfill#

    New cfp.setvars options affecting the grid plotting for the UKCP grid are:

    grid=True - draw grid
    @@ -69,7 +350,8 @@

    Example 32 - UKCP projection with blockfillgrid_thickness=1.0 - grid thickness

    Here we change the plotted grid with the grid_colour option to cfp.setvars, xticks and yticks options to cfp.con and make a blockfill plot.

    -
    _images/fig32.png +_images/fig32.png +
    import cf
     import cfplot as cfp
     import numpy as np
    @@ -86,8 +368,9 @@ 

    Example 32 - UKCP projection with blockfill -

    Example 33 - OSGB and EuroPP projections

    -_images/fig33.png +

    Example 33 - OSGB and EuroPP projections#

    +_images/fig33.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/ukcp_rcm_test.nc')[0]
    @@ -107,8 +390,9 @@ 

    Example 33 - OSGB and EuroPP projections -

    Example 34 - Cropped Lambert conformal projection

    -_images/fig34.png +

    Example 34 - Cropped Lambert conformal projection#

    +_images/fig34.png +

    Lambert conformal projections can now be cropped as in the following code:

    import cf
     import cfplot as cfp
    @@ -123,8 +407,9 @@ 

    Example 34 - Cropped Lambert conformal projection

    -

    Example 35 - Mollweide projection

    -_images/fig35.png +

    Example 35 - Mollweide projection#

    +_images/fig35.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -134,8 +419,9 @@ 

    Example 35 - Mollweide projection -

    Example 36 - Mercator projection

    -_images/fig36.png +

    Example 36 - Mercator projection#

    +_images/fig36.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -149,8 +435,9 @@ 

    Example 36 - Mercator projection -

    Example 37 - Orthographic projection

    -_images/fig37.png +

    Example 37 - Orthographic projection#

    +_images/fig37.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -164,8 +451,9 @@ 

    Example 37 - Orthographic projection -

    Example 38 - Robinson projection

    -_images/fig38.png +

    Example 38 - Robinson projection#

    +_images/fig38.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/tas_A1.nc')[0]
    @@ -181,43 +469,107 @@ 

    Example 38 - Robinson projection

    -
    -
    -
    -
    + + + + + +
    + +
    +
    +
    + +
    + + + + -
    + + + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/regression_tests.html b/docs/build/regression_tests.html index c443c13..7a36bf4 100644 --- a/docs/build/regression_tests.html +++ b/docs/build/regression_tests.html @@ -1,65 +1,251 @@ + - + + + regression_tests — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    regression_tests

    -
    -
    -cfplot.regression_tests()[source]
    -
    -
    Test for cf-plot regressions
    -
    Run through some standard levs, gvals, lon and lat labelling
    -
    Make all the gallery plots and use Imagemagick to display them
    -
    alongside a reference plot
    -

    -

    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    +
    - +
    + + + + + +
    + +
    +

    regression_tests#

    +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    + + +
    \ No newline at end of file diff --git a/docs/build/regrid.html b/docs/build/regrid.html index 65a97c4..1b5c7ab 100644 --- a/docs/build/regrid.html +++ b/docs/build/regrid.html @@ -1,46 +1,323 @@ + - + + + regrid — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    regrid

    +

    regrid#

    -cfplot.regrid(f=None, x=None, y=None, xnew=None, ynew=None)[source]
    +cfplot.regrid(f=None, x=None, y=None, xnew=None, ynew=None)[source]#
    -
    regrid - bilinear interpolation of a grid to new grid locations
    -

    +
    Bilinear interpolation of a grid to new grid locations.

    f=None - original field
    @@ -58,50 +335,106 @@

    regrid

    -

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/reset.html b/docs/build/reset.html index 058e345..e1f22f7 100644 --- a/docs/build/reset.html +++ b/docs/build/reset.html @@ -1,74 +1,251 @@ + - + + + reset — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - -
    -

    reset

    -
    -
    -cfplot.reset()[source]
    -
    -
    reset all plotting variables
    -

    -

    -

    -

    -

    -

    -

    -
    -
    -
    Returns:
    -

    name

    -
    -
    -
    -

    -

    -

    + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    +
    -
    + -
    + +
    + + + + +
    +
    + + + +
    + + + + -
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    + +
    +

    reset#

    +
    +
    +cfplot.reset()[source]#
    +
    +
    Reset all plotting variables.
    +

    +
    +
    +
    Returns:
    +

    name

    +
    +
    +
    + +
    + + +
    + + + + + +
    + +
    +
    +
    + +
    + + + +
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/rgaxes.html b/docs/build/rgaxes.html index 1be6400..b5edb8d 100644 --- a/docs/build/rgaxes.html +++ b/docs/build/rgaxes.html @@ -1,45 +1,323 @@ + - + + + rgaxes — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    rgaxes

    +

    rgaxes#

    -cfplot.rgaxes(xpole=None, ypole=None, xvec=None, yvec=None, xticks=None, xticklabels=None, yticks=None, yticklabels=None, axes=None, xaxis=None, yaxis=None, xlabel=None, ylabel=None)[source]
    +cfplot.rgaxes(xpole=None, ypole=None, xvec=None, yvec=None, xticks=None, xticklabels=None, yticks=None, yticklabels=None, axes=None, xaxis=None, yaxis=None, xlabel=None, ylabel=None)[source]#
    -
    rgaxes - label rotated grid plots
    +
    Label rotated grid plots.

    xpole=None - location of xpole in degrees
    ypole=None - location of ypole in degrees
    @@ -62,56 +340,105 @@

    rgaxes

    name

    -
    -

    -

    -

    -

    -

    -

    -
    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/rotated_pole.html b/docs/build/rotated_pole.html index 56b70df..39f3390 100644 --- a/docs/build/rotated_pole.html +++ b/docs/build/rotated_pole.html @@ -1,43 +1,324 @@ + - + + + Rotated pole plots — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Rotated pole plots

    +

    Rotated pole plots#

    -

    Example 21 - rotated pole data plot

    -_images/fig21.png +

    Example 21 - rotated pole data plot#

    +_images/fig21.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/rgp.nc')[0]
    @@ -51,9 +332,10 @@ 

    Example 21 - rotated pole data plot -

    Example 22 - rotated pole data on the native grid

    +

    Example 22 - rotated pole data on the native grid#

    This plot shows some rotated pole data on the native grid. Notice the way that the longitude lines are warped away from the centre of the plot. Data over the equatorial regions show little of this warping.

    -_images/fig22.png +_images/fig22.png +
    import cf
     import cfplot as cfp
     f=cf.read('cfplot_data/rgp.nc')[0]
    @@ -64,7 +346,7 @@ 

    Example 22 - rotated pole data on the native grid

    -

    Example 23 - Overlaying vectors over a rotated pole data plot

    +

    Example 23 - Overlaying vectors over a rotated pole data plot#

    In this plot a cylindrical projection plot of rotated pole data is overlayed with wind vectors.

    Care is needed when making vector plots as the vectors can be of two forms:
    @@ -73,7 +355,8 @@

    Example 23 - Overlaying vectors over a rotated pole data plot_images/fig23.png +_images/fig23.png +
    import cf
     import cfplot as cfp
     
    @@ -95,43 +378,102 @@ 

    Example 23 - Overlaying vectors over a rotated pole data plot

    -
    -

    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/routines.html b/docs/build/routines.html index 26b4015..a721a30 100644 --- a/docs/build/routines.html +++ b/docs/build/routines.html @@ -1,40 +1,320 @@ + - + + + Routines — cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - - - - -
    -
    -
    -
    - + + + + + + + + + + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    + +
    + +
    + + + + + + +
    +
    + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + +
    +
    + +
    +
    + +
    + +
    + + + + +
    + +
    + + +
    +
    + + + + + +
    +
    -

    Routines

    +

    Routines#

    Contents:

      @@ -130,43 +410,88 @@

      Routines

    -
    -
    -
    -
    -
    + + +
    +
    + +
    + +
    - + + + + + +
    +
    \ No newline at end of file diff --git a/docs/build/search.html b/docs/build/search.html index 40a96e0..870d9cb 100644 --- a/docs/build/search.html +++ b/docs/build/search.html @@ -1,80 +1,250 @@ + - + + + - - Search — cf-plot 3.3.0 documentation + Search - cf-plot 3.3.0 documentation + + + + + + + + + + + + + + + + - - - - + + + + + + + - + - - - + + + + - - - - - - -
    -
    -
    -
    - -

    Search

    + + + -