The pyedb.generic.plot library#

Summary#

plot_matplotlib

Create a matplotlib plot based on a list of data.

Module detail#

plot.plot_matplotlib(plot_data, size=(2000, 1000), show_legend=True, xlabel='', ylabel='', title='', save_plot=None, x_limits=None, y_limits=None, axis_equal=False, annotations=None, show=True)#

Create a matplotlib plot based on a list of data.

Parameters:
plot_datalist of list

List of plot data. Every item has to be in the following format For type fill: [x points, y points, color, label, alpha, type==”fill”]. For type path: [vertices, codes, color, label, alpha, type==”path”]. For type contour: [vertices, codes, color, label, alpha, line_width, type==”contour”].

sizetuple, optional

Image size in pixel (width, height). Default is (2000, 1000).

show_legendbool, optional

Either to show legend or not. Default is True.

xlabelstr, optional

Plot X label. Default is “”.

ylabelstr, optional

Plot Y label. Default is “”.

titlestr, optional

Plot Title label. Default is “”.

save_plotstr, optional

If a path is specified the plot will be saved in this location. If save_plot is provided, the show parameter is ignored.

x_limitslist, optional

List of x limits (left and right). Default is None.

y_limitslist, optional

List of y limits (bottom and top). Default is None.

axis_equalbool, optional

Whether to show the same scale on both axis or have a different scale based on plot size.

Default is False.

annotationslist, optional

List of annotations to add to the plot. The format is [x, y, string, dictionary of font options]. Default is None.

showbool, optional

Whether to show the plot or return the matplotlib object. Default is True.

Returns:
matplotlib.plt

Matplotlib fig object.