plot_graph¶
-
menpo.visualize.
plot_graph
(x_axis, y_axis, legend_entries=None, title=None, x_label=None, y_label=None, x_axis_limits=None, y_axis_limits=None, figure_size=(10, 6), style='coloured')[source]¶ Widget that allows plotting various curves in a graph using
GraphPlotter
.The widget has options tabs regarding the graph and the renderer (lines, markers, legend, figure, axes, grid) and saving the figure to file.
Parameters: - x_axis (list of float) – The values of the horizontal axis. Note that these values are common for all the curves.
- y_axis (list of lists of float) – A list that stores a list of values to be plotted for each curve.
- legend_entries (list or str or
None
, optional) – The list of names that will appear on the legend for each curve. IfNone
, then the names format iscurve {}.format(i)
. - title (str or
None
, optional) – The title of the graph. - x_label (str or
None
, optional) – The label on the horizontal axis of the graph. - y_label (str or
None
, optional) – The label on the vertical axis of the graph. - x_axis_limits ((float, float) or
None
, optional) – The limits of the horizontal axis. IfNone
, the limits are set based on the min and max values of x_axis. - y_axis_limits ((float, float), optional) – The limits of the vertical axis. If
None
, the limits are set based on the min and max values of y_axis. - figure_size ((int, int), optional) – The initial size of the rendered figure.
- style ({
'coloured'
,'minimal'
}, optional) – If'coloured'
, then the style of the widget will be coloured. Ifminimal
, then the style is simple using black and white colours.