Skip to content

Commit 2f7c8ce

Browse files
committed
📖
1 parent 016c6f1 commit 2f7c8ce

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

plotly_resampler/figure_resampler/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Module withholdingg wrappers for the plotly ``go.Figure`` and ``go.FigureWidget`` class
4-
which allows bookkeeping and back-end based resampling of high-frequency sequential data.
3+
Module withholding wrappers for the plotly ``go.Figure`` and ``go.FigureWidget`` class
4+
which allows bookkeeping and back-end based resampling of high-frequency sequential
5+
data.
56
67
Tip
78
---

plotly_resampler/figure_resampler/figure_resampler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"""
33
``FigureResampler`` wrapper around the plotly ``go.Figure`` class.
44
5+
Creates a web-application and uses ``dash`` callbacks to enable dynamic resampling.
6+
57
"""
68

79
from __future__ import annotations
@@ -88,8 +90,7 @@ def show_dash(
8890
``config`` parameter for this property in this method.
8991
See more https://dash.plotly.com/dash-core-components/graph
9092
**kwargs: dict
91-
Additional app.run_server() kwargs.
92-
e.g.: port
93+
Additional app.run_server() kwargs. e.g.: port
9394
9495
"""
9596
graph_properties = {} if graph_properties is None else graph_properties

plotly_resampler/figure_resampler/figure_resampler_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Abstract interface of which the concrete *Resampler* classes write towards.
3+
Abstract ``AbstractFigureAggregator`` interface for the concrete *Resampler* classes.
4+
5+
.. |br| raw:: html
6+
7+
<br>
48
59
"""
610

plotly_resampler/figure_resampler/figurewidget_resampler.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"""
33
``FigureWidgetResampler`` wrapper around the plotly ``go.FigureWidget`` class.
44
5+
Utilizes the ``fig.layout.on_change`` method to enable dynamic resampling.
6+
57
"""
68

79
from __future__ import annotations
@@ -25,7 +27,10 @@ class _FigureWidgetResamplerM(type(AbstractFigureAggregator), type(go.FigureWidg
2527
class FigureWidgetResampler(
2628
AbstractFigureAggregator, go.FigureWidget, metaclass=_FigureWidgetResamplerM
2729
):
28-
"""Data aggregation functionality wrapper for ``go.FigureWidgets``."""
30+
"""Data aggregation functionality wrapper for ``go.FigureWidgets``.
31+
32+
.. attention:: This wrapper only works within ``jupyter``-based environments.
33+
"""
2934

3035
def __init__(
3136
self,
@@ -105,7 +110,7 @@ def _update_x_ranges(self, layout, *x_ranges):
105110
relayout_dict[f"{xaxis_str}.range[0]"] = x_range[0]
106111
relayout_dict[f"{xaxis_str}.range[1]"] = x_range[1]
107112

108-
# An update will take place for that trace
113+
# An update will take place for that trace
109114
# -> save current xaxis range to _prev_layout
110115
self._prev_layout[xaxis_str]['range'] = x_range
111116

0 commit comments

Comments
 (0)