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
, theline_plot
will be treated as aLineCollection
. Otherwise, it will be treated as aLine2D
.
- 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 aLineCollection
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.