Ternary contour plot. Parameters ---------- coordinates : list or ndarray Barycentric coordinates of shape (2, N) or (3, N) where N is the number of data points. The sum of the 3 coordinates is expected to be 1 for all data points. values : array-like
(
coordinates,
values,
pole_labels=["a", "b", "c"],
width=500,
height=500,
ncontours=None,
showscale=False,
coloring=None,
colorscale="Bluered",
linecolor=None,
title=None,
interp_mode="ilr",
showmarkers=False,
)
| 509 | |
| 510 | |
| 511 | def create_ternary_contour( |
| 512 | coordinates, |
| 513 | values, |
| 514 | pole_labels=["a", "b", "c"], |
| 515 | width=500, |
| 516 | height=500, |
| 517 | ncontours=None, |
| 518 | showscale=False, |
| 519 | coloring=None, |
| 520 | colorscale="Bluered", |
| 521 | linecolor=None, |
| 522 | title=None, |
| 523 | interp_mode="ilr", |
| 524 | showmarkers=False, |
| 525 | ): |
| 526 | """ |
| 527 | Ternary contour plot. |
| 528 | |
| 529 | Parameters |
| 530 | ---------- |
| 531 | |
| 532 | coordinates : list or ndarray |
| 533 | Barycentric coordinates of shape (2, N) or (3, N) where N is the |
| 534 | number of data points. The sum of the 3 coordinates is expected |
| 535 | to be 1 for all data points. |
| 536 | values : array-like |
| 537 | Data points of field to be represented as contours. |
| 538 | pole_labels : str, default ['a', 'b', 'c'] |
| 539 | Names of the three poles of the triangle. |
| 540 | width : int |
| 541 | Figure width. |
| 542 | height : int |
| 543 | Figure height. |
| 544 | ncontours : int or None |
| 545 | Number of contours to display (determined automatically if None). |
| 546 | showscale : bool, default False |
| 547 | If True, a colorbar showing the color scale is displayed. |
| 548 | coloring : None or 'lines' |
| 549 | How to display contour. Filled contours if None, lines if ``lines``. |
| 550 | colorscale : None or str (Plotly colormap) |
| 551 | colorscale of the contours. |
| 552 | linecolor : None or rgb color |
| 553 | Color used for lines. ``colorscale`` has to be set to None, otherwise |
| 554 | line colors are determined from ``colorscale``. |
| 555 | title : str or None |
| 556 | Title of ternary plot |
| 557 | interp_mode : 'ilr' (default) or 'cartesian' |
| 558 | Defines how data are interpolated to compute contours. If 'irl', |
| 559 | ILR (Isometric Log-Ratio) of compositional data is performed. If |
| 560 | 'cartesian', contours are determined in Cartesian space. |
| 561 | showmarkers : bool, default False |
| 562 | If True, markers corresponding to input compositional points are |
| 563 | superimposed on contours, using the same colorscale. |
| 564 | |
| 565 | Examples |
| 566 | ======== |
| 567 | |
| 568 | Example 1: ternary contour plot with filled contours |
nothing calls this directly
no test coverage detected