mooplot.plot_pf#
- mooplot.plot_pf(datasets, type='points', filter_dominated=True, **layout_kwargs)[source]#
Plot Pareto fronts. It can produce an interactive point graph, stair step graph or 3D surface graph. It accepts 2 or 3 objectives.
- Parameters:
datasets (
numpy array
) – Thedataset
argument must be Numpy array produced by themoocore.read_datasets()
function, i.e., an array with 3-4 columns including the objective data and set numbers.type (
str
, optional) –Type of plot. Any of:
’points’ : produces a scatter-like point graph (2 or 3 objectives)
’lines’ : produces a stepped line graph (2 objectives only)
’points,lines’ : produces a stepped line graph with points (2 objective only)
’fill’ : produces a stepped line graph with filled areas between lines - see
plot_eaf()
(2 objective only)’surface’ : produces a smoothed 3d surface (3 objective only)
’surface,points’ : produces a smoothed 3d surface with datapoints plotted (3 objective only)
’cube’ : produces a discrete cube surface (3 objective only)
Abbreviations such as ‘p’ or ‘p,l’ are accepted.
filter_dominated (
bool
, optional) – Whether to automatically filter dominated points within each set. Default is True.layout_kwargs (
dict
) – Update features of the graph such as title axis titles, colours etc. These additional parameters are passed to plotly update_layout. See here for all the layout features that can be accessed: Layout Plotly reference
- Returns:
plotly.graph_objects.Figure
– The function returns aPlotly GO figure
object: Plotly Figure referenceThis means that the user can customise any part of the graph after it is created
Examples
>>> x = moocore.read_datasets(moocore.get_dataset_path("input1.dat")) >>> mooplot.plot_pf(x, type="points,lines") Figure({...
Examples using
mooplot.plot_pf
#Plotting Pareto fronts with plot_pf()
Plotting Pareto fronts with plot_pf()