API reference#

API#

Plotting routines#

cfplot.con

Create a contour, (block)fill, or combined contour-(block)fill plot.

cfplot.lineplot

Create a line (graph) plot with optional markers.

cfplot.scatter

Create a scatter plot.

cfplot.stipple

Create a stipple plot to mark areas of interest.

cfplot.stream

Create a stream plot to show flow and gradients.

cfplot.traj

Create a trajectory plot for (discrete sampling) geometries.

cfplot.vect

Create a vector plot representing a two-dimensional vector field.

Utility Routines#

cfplot.add_cyclic

Add a cyclic longitude column if the grid doesn't span the full 360°.

cfplot.calculate_levels

Calculate contour levels automatically from field data.

cfplot.cf_var_name

Return the best available name for a CF field dimension coordinate.

cfplot.cf_var_name_titles

Return preferred coordinate name/units for dimension-title rendering.

cfplot.find_dim_names

Return dimension coordinate names in [X, Y, Z, T] order.

cfplot.find_z

Return the key for the Z coordinate of a CF field, or None.

cfplot.fix_floats

Fix numpy rounding issues.

cfplot.generate_titles

Generate dimension/cell-method title text for plot annotation.

cfplot.ndecs

Find the maximum number of decimal places in an array.

cfplot.polar_regular_grid

Return lon/lat and projected x/y points over a polar stereographic cap.

cfplot.rgaxes

Label rotated grid plots.

cfplot.stipple_points

Generate regular or offset sampling points over a rectangular domain.

Validation#

cfplot.check_well_formed

Check the coordinates are all of the form X, Y, Z, T.

cfplot.orca_check

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_ugrid

  • bfill

  • cf_data_assign

  • check_data

  • cscale_get_map

  • dim_titles

  • find_pos_in_array

  • irregular_window

  • map_grid

  • map_title

  • max_ndecs_data

  • pcon

  • plot_map_axes

  • process_color_scales

  • set_map

  • supscr

  • timeaxis

  • vloc