fatf.utils.testing.vis.get_line_data

fatf.utils.testing.vis.get_line_data(line_plot: Union[matplotlib.lines.Line2D, matplotlib.collections.LineCollection], is_collection: bool = False) → Tuple[Union[numpy.ndarray, List[numpy.ndarray]], str, float, str, float][source]

Extracts line’s data array, colour, alpha channel, label and width.

Parameters
line_plotUnion[matplotlib.lines.Line2D, matplotlib.collections.LineCollection]

A matplotlib line object extracted from a plot’s axis.

is_collectionboolean, optional (default=False)

If True, the line_plot will be treated as a LineCollection. Otherwise, it will be treated as a Line2D.

Returns
line_dataUnion[numpy.ndarray, List[numpy.ndarray]]

For Line2D this will be a numpy array representing x-axis and y-axis values used to interpolate a line. On the other hand, for a LineCollection this will be a list of numpy arrays, each representing a single line in the collection.

line_colourstring

Line colour.

line_alphafloat

Line transparency expressed as the alpha channel.

line_labelstring

Line label used for the plot’s legend.

line_widthfloat

Line width.