Parallel Coordinates¶
parallel_coordinates
¶
Classes¶
Functions¶
plot_parallel_coordinates
¶
plot_parallel_coordinates(results: OptimizationResult | list[OptimizationResult] | dict[str, OptimizationResult], selected_columns: list[str] | None = None, include_design_vars: bool = True, include_objectives: bool = True, include_constraints: bool = False, include_observables: bool = False, include_sets_as_dimensions: bool | list[str] = False, result_sets: list[str] | None = None, highlight_feasible: bool = False, constraint_tolerance: float = 1e-06, colorscale: str = 'Viridis', color_by: str | None = None, width: int = 1200, height: int = 700, title: str | None = None, theme: str | None = 'plotly_white', vertical: bool = False) -> Figure
Create a parallel coordinates plot from optimization results.
This unified function handles three use cases: 1. Single result with auto-selected columns (original plot_parallel_coordinates) 2. Multiple results with manual column selection (original plot_parallel_coordinates_from_results) 3. Multiple results comparison with common columns (original plot_parallel_coordinates_comparison)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
OptimizationResult | list[OptimizationResult] | dict[str, OptimizationResult]
|
Single OptimizationResult, list of results, or dict mapping names to results |
required |
selected_columns
|
list[str] | None
|
Specific columns to plot (overrides include_* flags if provided) |
None
|
include_design_vars
|
bool
|
Include design variables as axes |
True
|
include_objectives
|
bool
|
Include objectives as axes |
True
|
include_constraints
|
bool
|
Include constraints as axes |
False
|
include_observables
|
bool
|
Include observables as axes |
False
|
include_sets_as_dimensions
|
bool | list[str]
|
Include specific sets (or all if True) as boolean axes |
False
|
result_sets
|
list[str] | None
|
list of result set names to highlight with different colors |
None
|
highlight_feasible
|
bool
|
Color feasible vs infeasible solutions differently |
False
|
constraint_tolerance
|
float
|
Tolerance for constraint violations |
1e-06
|
colorscale
|
str
|
Plotly colorscale name |
'Viridis'
|
color_by
|
str | None
|
Column name or "_result" to color lines by |
None
|
width
|
int
|
Figure width |
1200
|
height
|
int
|
Figure height |
700
|
title
|
str | None
|
Plot title |
None
|
theme
|
str | None
|
Plotly theme to apply |
'plotly_white'
|
vertical
|
bool
|
If True, rotate plot to vertical orientation |
False
|
Returns:
| Type | Description |
|---|---|
Figure
|
Plotly Figure object |
Source code in optiscope/plotting/parallel_coordinates.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |