Index
subsurfaceio.plotly_utils
Shared Plotly helpers.
Register the module template and the Plotly Express mixed-dtype patch:
Trace styling literals live on
Literals.
Modules:
| Name | Description |
|---|---|
patches |
|
shapes_3d |
Three-dimensional Plotly surface primitives. |
traces_props |
Plotly trace property literals for subsurfaceio models. |
Functions:
| Name | Description |
|---|---|
ensure_plotly_ready |
Register the subsurfaceio Plotly template and patch Plotly Express once. |
register_template |
Register the module Plotly template without changing the global default. |
Attributes:
| Name | Type | Description |
|---|---|---|
FIGURE_CONFIG |
dict[str, Any]
|
Default Plotly figure config for |
TEMPLATE |
str
|
Template string for module-owned Plotly figures. |
TEMPLATE_NAME |
str
|
Registered name of the module Plotly layout template. |
FIGURE_CONFIG
module-attribute
FIGURE_CONFIG: dict[str, Any] = {
"displaylogo": False,
"modeBarButtonsToAdd": [
"v1hovermode",
"toggleSpikeLines",
],
"modeBarButtonsToRemove": [
"lasso2d",
"select2d",
"zoomIn2d",
"autoScale2d",
"zoomOut2d",
],
"toImageButtonOptions": dict(format="svg"),
}
Default Plotly figure config for fig.show() in the browser renderer.
Pass to the renderer config when displaying figures interactively, for
example pio.renderers['browser'].config.update(FIGURE_CONFIG).
TEMPLATE
module-attribute
Template string for module-owned Plotly figures.
Compose simple_white with the registered subsurfaceio template. Pass to
Plotly Express (template=TEMPLATE) or apply with
fig.update_layout(template=TEMPLATE).
TEMPLATE_NAME
module-attribute
Registered name of the module Plotly layout template.
ensure_plotly_ready
Register the subsurfaceio Plotly template and patch Plotly Express once.