Latest Version: pymoo==0.3.2

Parallel Coordinate Plots

For higher dimensional data Parallel Coordinate Plots are a powerful tool to analyze how dense solutions are distributed in different ranges regarding each coordinate.

Let us create some data for the purpose of visualization:

from pymoo.factory import get_problem, get_reference_directions

ref_dirs = get_reference_directions("das-dennis", 6, n_partitions=5) * [2, 4, 8, 16, 32, 64]
F = get_problem("dtlz1").pareto_front(ref_dirs)

This is the Pareto-front for the DTLZ1 test problem with 6 objectives with some scale added. We add a different scaling to show the effect of normalization later on. Let us assume our algorithm converged after a number of generation and this is the result set.

from pymoo.visualization.pcp import PCP

This gives an idea of the overall result set. Let us assume we identified solution 50 and 75 to more of interesest and like to highlight them in our plot:

plot = PCP()
plot.set_axis_style(color="grey", alpha=0.5)
plot.add(F, color="grey", alpha=0.3)
plot.add(F[50], linewidth=5, color="red")
plot.add(F[75], linewidth=5, color="blue")

Please note, that the PCP object just is a wrapper around a matplotlib figure. All options that apply for plotting the corresponding type (here line, but can also be scatter, polygon, …) can be used, such as linde width, color and alpha.

Some more options to be used in a plot

plot = PCP(title=("Run", {'pad': 30}),
           legend=(True, {'loc': "upper left"}),
           labels=["profit", "cost", "sustainability", "environment", "satisfaction", "time"]

plot.set_axis_style(color="grey", alpha=1)
plot.add(F, color="grey", alpha=0.3)
plot.add(F[50], linewidth=5, color="red", label="Solution A")
plot.add(F[75], linewidth=5, color="blue", label="Solution B")

Moreover, if the boundaries should be set manually, this can be achieved by turning the default normalization of and providing them. Either directly as a numpy array or just an integer to be set for all axes.

plot.normalize_each_axis = False
<Figure size 576x432 with 0 Axes>


class pymoo.visualization.pcp.PCP(self, bounds=None, show_bounds=True, n_ticks=5, normalize_each_axis=True, **kwargs)

Parallel Coordinate Plot


If plot requires normalization, it might be necessary to supply the boundaries. (Otherwise they might be approximate by the minimum and maximum of the provided data). The boundaries should be provided as a list/tuple or 2D numpy array, where the first element represents the minimum, second the second the maximum values. If only an integer or float is supplied, the boundaries apply for each variable.


Most of the plots consists of an axis. The style of the axis, e.g. color, alpha, …, can be changed to further modify the plot appealing.

labelsstr or list

The labels to be used for each variable provided in the plot. If a string is used, then they will be enumerated. Otherwise, a list equal to the number of variables can be provided directly.


Number of ticks to be shown on each parallel axis.


Whether the value of the boundaries are shown in the plot or not.


Whether the values should be normalized either by bounds or implictly.

Other Parameters

The figure size. Default (figsize=(8, 6)). For some plots changing the size might have side-effects for position.

titlestr or tuple

The title of the figure. If some additional kwargs should be provided this can be achieved by providing a tuple (“name”, {“key” : val}).


Whether a legend should be shown or not.


Whether tight layout should be used.


For some plots different kind of colors are used. The colormap can be changed to modify the color sequence for the plots.