API reference#

API#

Plotting routines#

cfplot.con

The interface to contouring in cf-plot.

cfplot.lineplot

The interface to line plotting in cf-plot.

cfplot.stipple

Put markers on a plot to indicate value of interest.

cfplot.stream

Plot a streamplot to show fluid flow and 2D field gradients.

cfplot.traj

The interface to trajectory plotting in cf-plot.

cfplot.vect

Plot vectors.

Calculations#

cfplot.calculate_levels

Calculate contour levels.

Utility Routines#

cfplot.add_cyclic

A wrapper for cartopy_util.add_cyclic_point(field, lons).

cfplot.cf_var_name

Return the name from a supplied dimension in order.

cfplot.cf_var_name_titles

Return the name from a supplied dimension in order.

cfplot.find_dim_names

Find the field dimension coordinate names.

cfplot.find_pos_in_array

Find the position of a point in an array.

cfplot.find_z

Find the Z coordinate if it exists.

cfplot.fix_floats

Fixes numpy rounding issues where 0.4 becomes 0.399999999999999999999.

cfplot.generate_titles

Generate a set of title dims to put at the top of plots.

cfplot.irregular_window

TODO DOCS.

cfplot.max_ndecs_data

TODO DOCS.

cfplot.ndecs

Finds the number of decimal places in an array.

cfplot.pcon

Convert pressure to height in kilometers and vice-versa.

cfplot.polar_regular_grid

Return a regular grid over a polar stereographic area.

cfplot.rgaxes

Label rotated grid plots.

cfplot.stipple_points

Calculate interpolation points.

cfplot.vloc

Locate the positions of a set of points in a vector.

Validation#

cfplot.check_well_formed

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

cfplot.orca_check

Check input data to see if it is 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 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

  • _bfill_ugrid

  • _cf_data_assign

  • _check_data

  • _cscale_get_map

  • _dim_titles

  • _gvals

  • _map_title

  • _mapaxis

  • _plot_map_axes

  • _process_color_scales

  • _set_map

  • _supscr

  • _timeaxis