cf.Field.axis

Field.axis(axes=None, size=None, **kwargs)[source]

{def_axis}

Returns:
out : str or None

The domain identifier of the unique axis or, if there isn’t one, None.

Examples 2:
>>> f
<CF Field: air_temperature(time(12), latitude(64), longitude(128)) K>
>>> f.data_axes()
['dim0', 'dim1', 'dim2']
>>> f.axis('time')
'dim0'
>>> f.axis('Y')
'dim1'
>>> f.axis(size=64)
'dim1'
>>> f.axis('X', size=128)
'dim2'
>>> print f.axis('foo')
None
>>> print f.axis('T', size=64)
None

Previous topic

cf.Field.axes_sizes

Next topic

cf.Field.axis_name

This Page