API reference#
API#
Plotting routines#
Create a contour, (block)fill, or combined contour-(block)fill plot. |
|
Create a line (graph) plot with optional markers. |
|
Create a scatter plot. |
|
Create a stipple plot to mark areas of interest. |
|
Create a stream plot to show flow and gradients. |
|
Create a trajectory plot for (discrete sampling) geometries. |
|
Create a vector plot representing a two-dimensional vector field. |
Graphics related#
Open a graphics file to contain plots. |
|
Close a plot graphics file and save and/or view the output. |
|
Set subplot position, starting at 1 for the top-left position. |
|
Manage a figure containing multiple plots and/or layers on one plot. |
Configuration related#
Set axes plotting parameters in shared state. |
|
Specify axes plotting parameters. |
|
Choose and manipulate colour maps in shared plotting state. |
|
Set plot limits for non-longitude-latitude plots. |
|
Set or clear the contour levels stored in shared plotting state. |
|
Set map plotting parameters in shared state. |
|
Stores plotting variables in cfp.plotvars. |
|
Reset plotting state to the default configuration. |
|
Set shared plotting variables from defaults plus explicit overrides. |
Colour related#
The cf-plot interface to Matplotlib colorbar for contour rendering. |
Utility Routines#
Add a cyclic longitude column if the grid doesn't span the full 360°. |
|
Calculate contour levels automatically from field data. |
|
Return the best available name for a CF field dimension coordinate. |
|
Return preferred coordinate name/units for dimension-title rendering. |
|
Return dimension coordinate names in [X, Y, Z, T] order. |
|
Return the key for the Z coordinate of a CF field, or None. |
|
Fix numpy rounding issues. |
|
Generate dimension/cell-method title text for plot annotation. |
|
Find the maximum number of decimal places in an array. |
|
Return lon/lat and projected x/y points over a polar stereographic cap. |
|
Label rotated grid plots. |
|
Generate regular or offset sampling points over a rectangular domain. |
Validation#
Check the coordinates are all of the form X, Y, Z, T. |
|
Check input data to test if it is on an ORCA ocean grid. |
Deprecated/Obsolete APIs#
Deprecations#
These functions are not intended for user use and will be removed in the next version. In most cases these have no use in the codebase as of v3.3.0.
Note the functions compare_arrays and regression_tests (version 3.3.0
and earlier) related to testing only so have been moved out of the
functional codebase.
Obsolete Internal API#
These routines (or a later counterpart with a leading underscore e.g. _check_data or check_data) were exposed in the user-facing API at versions 3.3.0 and below but were marked as not being intended for user use. They have therefore been removed except for under-the-hood processing at version 3.5.0. They are listed here for completeness and posterity.
If you made use of any of the functionality provided by these internal-use routines, and wish to have this in future, please get in touch to let us know and we may be able to support them again.
bfill_ugridbfillcf_data_assigncheck_datacscale_get_mapdim_titlesfind_pos_in_arrayirregular_windowmap_gridmap_titlemax_ndecs_datapconplot_map_axesprocess_color_scalesset_mapsupscrtimeaxisvloc