Parallel Coordinate Plots

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

Let us create some data for visualization:

from pymoo.problems.many.dtlz import DTLZ1
from pymoo.util.reference_direction import UniformReferenceDirectionFactory

ref_dirs = UniformReferenceDirectionFactory(6, n_partitions=5)() * [2, 4, 8, 16, 32, 64]
F = DTLZ1().pareto_front(ref_dirs)

This is the Pareto-front for the DTLZ1 test problem with six 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 some generations, and this is the result set.

from pymoo.visualization.pcp import PCP
<pymoo.visualization.pcp.PCP at 0x7f7cbb594a00>

This gives an idea of the overall result set. Let us assume we identified solution 50 and 75 to more of interest 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")
<pymoo.visualization.pcp.PCP at 0x7f7cbc265280>

Please note that the PCP object just is a wrapper around a matplotlib figure. All options that apply for plotting the corresponding type (here plot, but it can also be scatter, polygon, …) can be used, such as linewidth, color or 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")
<pymoo.visualization.pcp.PCP at 0x7f7cbcc8d6d0>

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
<pymoo.visualization.pcp.PCP at 0x7f7cbcc8d6d0>
<Figure size 800x600 with 0 Axes>


class pymoo.visualization.pcp.PCP(self, bounds=None, show_bounds=True, n_ticks=5, normalize_each_axis=True, bbox=False, **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.