SheetVector¶
- class tfv.visual.SheetVector(axes, extractor, expression, datum='sigma', limits=(0, 1), agg='mean', normalise=False, convention='cartesian', convention_base='east', convention_heading='CCW', plot_type='quiver', **kwargs)¶
Class for dynamic visualization of model result sheet extracts as gridded vector field
- Parameters:
axes (matplotlib.pyplot.Axes) – Axes object to display/render the graphics object
extractor (tfv.extractor.Extractor) – Extractor object which is extracting data
expression (tuple) – Tuple of string expressions that defines vector, e.g., (‘V_x’, ‘V_y’)
datum ({'sigma', 'depth', 'height', 'elevation'}) – Vertical depth-averaging datum i.e sigma, depth, height, elevation, top, bottom.
limits (tuple) – Vertical depth-averaging limits (z1, z2) relative to vertical datum.
agg (str) – Depth-averaging aggregation function. One of {min,`mean`,`max`}. Defaults to ‘mean’.
normalise (bool) – Flag to normalise the plotted vectors. Defaults to False.
convention (str) – Convention basis upon which to calculate and draw the vectors. One of {‘cartesian’, ‘polar’}. Defaults to ‘cartesian’. Cartesian convention expects the expression to be U/V components, while polar expects these to be MAG/THETA. The base and heading can be modified using convention_base and convention_heading.
convention_base (str) – Base from which angles are measured from, one of {‘north’,’east’}. Defaults to ‘east. Does not do anything unless convention == ‘polar’
convention_heading (str) – Direction which the angles are measured along. One of {‘CW’, ‘CCW’}. Defaults to ‘CCW’ for counter clockwise. Does not do anything unless convention == ‘polar’
plot_type (str) – Type of vector plot to show. One of {‘quiver’, ‘streamplot’}. Defaults to quiver.
- zoom()¶
Abstract method which zooms axis to extent of graphics object