Scatter Matrix¶
scatter_matrix
¶
Scatter Plot Matrix (SPLOM) for optimization visualization.
Provides interactive scatter matrix showing all pairwise relationships between variables with: - Brushing and linking across all subplots - Distribution plots on diagonal - Feasibility highlighting - Result set coloring - Correlation analysis
Classes¶
Functions¶
plot_scatter_matrix
¶
plot_scatter_matrix(result: OptimizationResult, variables: list[str] | None = None, include_objectives: bool = True, include_design_vars: bool = True, max_vars: int = 8, color_by: str | None = None, result_sets: list[str] | None = None, highlight_feasible: bool = False, show_distributions: bool = True, show_correlations: bool = True, constraint_tolerance: float = 1e-06, marker_size: int = 4, width: int = 1000, height: int = 1000, title: str | None = None) -> Figure
Create an interactive scatter plot matrix (SPLOM).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
OptimizationResult
|
OptimizationResult object |
required |
variables
|
list[str] | None
|
Specific variable names to include (if None, auto-select) |
None
|
include_objectives
|
bool
|
Include objectives in matrix |
True
|
include_design_vars
|
bool
|
Include design variables in matrix |
True
|
max_vars
|
int
|
Maximum number of variables to include |
8
|
color_by
|
str | None
|
Variable name to color points by |
None
|
result_sets
|
list[str] | None
|
List of result set names for coloring |
None
|
highlight_feasible
|
bool
|
Color by feasibility |
False
|
show_distributions
|
bool
|
Show histograms/KDE on diagonal |
True
|
show_correlations
|
bool
|
Show correlation values in upper triangle |
True
|
constraint_tolerance
|
float
|
Tolerance for feasibility check |
1e-06
|
marker_size
|
int
|
Size of markers |
4
|
width
|
int
|
Figure width in pixels |
1000
|
height
|
int
|
Figure height in pixels |
1000
|
title
|
str | None
|
Plot title |
None
|
Returns:
| Type | Description |
|---|---|
Figure
|
Plotly Figure with interactive scatter matrix |
Source code in optiscope/plotting/scatter_matrix.py
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
plot_correlation_heatmap
¶
plot_correlation_heatmap(result: OptimizationResult, variables: list[str] | None = None, include_objectives: bool = True, include_design_vars: bool = True, include_observables: bool = False, method: str = 'pearson', width: int = 800, height: int = 700, title: str | None = None) -> Figure
Create correlation heatmap for optimization variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
OptimizationResult
|
OptimizationResult object |
required |
variables
|
list[str] | None
|
Specific variables to include |
None
|
include_objectives
|
bool
|
Include objectives |
True
|
include_design_vars
|
bool
|
Include design variables |
True
|
include_observables
|
bool
|
Include observables |
False
|
method
|
str
|
Correlation method ('pearson', 'spearman', 'kendall') |
'pearson'
|
width
|
int
|
Figure width |
800
|
height
|
int
|
Figure height |
700
|
title
|
str | None
|
Plot title |
None
|
Returns:
| Type | Description |
|---|---|
Figure
|
Plotly Figure with correlation heatmap |
Source code in optiscope/plotting/scatter_matrix.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | |