mooplot.plot_pf#
- mooplot.plot_pf(data, type='points', filter_dominated=True, **layout_kwargs)[source]#
Plot Pareto fronts.
This function can produce an interactive point graph, stair step graph or 3D surface graph. It accepts 2 or 3 objectives.
- Parameters:
data (
ArrayLike) – Array of numerical values, maybe created bymoocore.read_datasets(), where each row gives the coordinates of a point in objective space and the last column defines the sets to which each row ofdatabelongs.type (
str, default:'points') –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, default:True) – Whether to automatically filter dominated points within each set. Default isTrue.layout_kwargs – 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:
Figure– A Plotly GO figure object: Plotly Figure reference This means that the user can customise any part of the graph after it is created
Examples
>>> x = moocore.get_dataset("input1.dat") >>> mooplot.plot_pf(x, type="points,lines") Figure({...