You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
158
158
159
159
* When running the code on a server, you should forward the port of the `FigureResampler.show_dash()` method to your local machine.<br>
160
160
**Note** that you can add dynamic aggregation to plotly figures with the `FigureWidgetResampler` wrapper without needing to forward a port!
161
-
* The `FigureWidgetResampler`*uses the python main thread*for its data aggregation functionality, so when this main thread is occupied, no resampling logic can be executed. For example; if you perform long computations within your notebook, the kernel will be occupied during these computations, and will only execute the resampling operations which take place during these computations after finishing that computation.
161
+
* The `FigureWidgetResampler`*uses the IPython main thread*for its data aggregation functionality, so when this main thread is occupied, no resampling logic can be executed. For example; if you perform long computations within your notebook, the kernel will be occupied during these computations, and will only execute the resampling operations that take place during these computations after finishing that computation.
162
162
* In general, when using downsampling one should be aware of (possible) [aliasing](https://en.wikipedia.org/wiki/Aliasing) effects.
163
163
The <b style="color:orange">[R]</b>in the legend indicates when the corresponding trace is being resampled (and thus possibly distorted) ornot. Additionally, the `~<range>` suffix represent the mean aggregation bin size in terms of the sequence index.
164
164
* The plotly **autoscale** event (triggered by the autoscale button or a double-click within the graph), **does not reset the axes but autoscales the current graph-view** of plotly-resampler figures. This design choice was made as it seemed more intuitive for the developers to support this behavior with double-click than the default axes-reset behavior. The graph axes can ofcourse be resetted by using the `reset_axis` button. If you want to give feedback and discuss this further with the developers, see issue [#49](https://github.com/predict-idlab/plotly-resampler/issues/49).
Copy file name to clipboardExpand all lines: docs/sphinx/FAQ.rst
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ FAQ ❓
20
20
21
21
This tilde suffix is only shown when the data is aggregated and represents the *mean aggregation bin size* which is the mean index-range difference between two consecutive aggregated samples.
22
22
23
-
* for *time-indexed data*: the mean time-range which is span between 2 consecutive samples.
24
-
* for *numeric-indexed data*: the mean numeric range which is span between 2 consecutive samples.
23
+
* for *time-indexed data*: the mean time-range between 2 consecutive (sampled) samples.
24
+
* for *numeric-indexed data*: the mean numeric range between 2 consecutive (sampled) samples.
25
25
26
26
When the index is a range-index; the *mean aggregation bin size* represents the *mean* downsample ratio; i.e., the mean number of samples that are aggregated into one sample.
27
27
@@ -44,7 +44,7 @@ plotly-resampler can be thought of as wrapper around plain plotly figures which
44
44
* To have dynamic aggregation:
45
45
46
46
* with ``FigureResampler``, you need to call ``show_dash`` (or output the object in a cell via ``IPython.display``) -> which spawns a dash-web app, and the dynamic aggregation is realized with dash callback
47
-
* with ``FigureWidgetResampler``, you need to use ``IPython.display`` on the object, which uses widget-events to realize dynamic aggregation.
47
+
* with ``FigureWidgetResampler``, you need to use ``IPython.display`` on the object, which uses widget-events to realize dynamic aggregation (via the running IPython kernel).
48
48
49
49
.. raw:: html
50
50
@@ -57,7 +57,7 @@ plotly-resampler can be thought of as wrapper around plain plotly figures which
57
57
</summary>
58
58
<divstyle="margin-left:1em">
59
59
60
-
The ``TraceUpdater`` class is a custom dash component that aids ``dcc.Graph`` components to efficiently sent and update (in our case aggregated) data to the front-end.
60
+
The ``TraceUpdater`` class is a custom dash component that aids ``dcc.Graph`` components to efficiently send and update (in our case aggregated) data to the front-end.
61
61
62
62
For more information on how to use the trace-updater component together with the ``FigureResampler``, see our dash app `examples <https://github.com/predict-idlab/plotly-resampler/tree/main/examples>`_` and look at the `trace-updater <https://github.com/predict-idlab/trace-updater/blob/master/trace_updater/TraceUpdater.py>`_ its documentation.
63
63
@@ -78,19 +78,19 @@ For more information on how to use the trace-updater component together with the
78
78
79
79
**The main differences are**:
80
80
81
-
Datashader is able deal with various kinds of data (e.g., location related data, point clouds, ...), and plotly-resampler is more tailored towards time-series data visualizations.
81
+
Datashader can deal with various kinds of data (e.g., location related data, point clouds), whereas plotly-resampler is more tailored towards time-series data visualizations.
82
82
Furthermore, datashader outputs a **rasterized image/array** encompassing all traces their data, whereas plotly-resampler outputs an **aggregated series** per trace. Thus, datashader is more suited for analyzing data where you do not want to pin-out a certain series/trace.
83
83
84
84
In our opinion, datashader truly shines (for the time series use case) when:
85
85
86
86
* you want a global, overlaying view of all your traces
87
87
* you want to visualize a large number of time series in a single plot (many traces)
88
-
* there is a lot of noise on your high-frequency data and want to uncover the underlying pattern
88
+
* there is a lot of noise on your high-frequency data and you want to uncover the underlying pattern
89
89
* you want to render all data points in your visualization
90
90
91
91
In our opinion, plotly-resampler shines when:
92
92
93
-
* you need the capabilities to interact with the traces (e.g., hovering, toggling traces, hovertext pet trace)
93
+
* you need the capabilities to interact with the traces (e.g., hovering, toggling traces, hovertext per trace)
94
94
* you want to use a less complex (but more restricted) visualization interface (as opposed to holoviews), i.e., plotly
95
95
* you want to make existing plotly time-series figures more scalable and efficient
96
96
* to build scalable Dash apps for time-series data visualization
Copy file name to clipboardExpand all lines: docs/sphinx/getting_started.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Dynamic resampling callbacks are realized:
56
56
57
57
**To add dynamic resampling using a FigureWidget, you should**:
58
58
1. wrap your plotly Figure (can be a ``go.Figure``) with :class:`FigureWidgetResampler <plotly_resampler.figure_resampler.FigureWidgetResampler>`
59
-
2. output the ```FigureWidgetResampler`` instance in a cell
59
+
2. output the ``FigureWidgetResampler`` instance in a cell
60
60
61
61
.. tip::
62
62
@@ -120,7 +120,7 @@ The gif below demonstrates the example usage of of :class:`FigureWidgetResampler
120
120
<br><br>
121
121
122
122
123
-
Furthermore, plotly figurewidget allows to conveniently add callbacks to for example click events. This allows to create a high-frequency time series annotation app in a couple of lines; a shown in the gif below and `this notebook <https://github.com/predict-idlab/plotly-resampler/blob/main/examples/figurewidget_example.ipynb>`_.
123
+
Furthermore, plotly's ``FigureWidget`` allows to conveniently add callbacks to for example click events. This allows creating a high-frequency time series annotation app in a couple of lines; as shown in the gif below and in `this notebook <https://github.com/predict-idlab/plotly-resampler/blob/main/examples/figurewidget_example.ipynb>`_.
Copy file name to clipboardExpand all lines: examples/README.md
+4-11Lines changed: 4 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,6 @@
1
1
# plotly-resampler examples
2
2
3
-
This directory withholds several examples, highlighting the applicability of
4
-
plotly-resampler for various use cases.
5
-
6
-
To successfully run these examples, make sure that you've installed all the requirements by running:
7
-
```bash
8
-
pip install -r requirements.txt
9
-
```
3
+
This directory withholds several examples, highlighting the applicability of plotly-resampler for various use cases.
10
4
11
5
12
6
## Prerequisites
@@ -19,8 +13,7 @@ pip install -r requirements.txt
19
13
## 1. Example notebooks
20
14
### 1.1 basic examples
21
15
22
-
The [basic example notebook](basic_example.ipynb) covers most use-cases in which plotly resampler will be employed. It is the ideal hands-on starting point for data-scientists who want to use
23
-
plotly-resampler in their day-to-day jupyter environments.
16
+
The [basic example notebook](basic_example.ipynb) covers most use-cases in which plotly resampler will be employed. It servers as an ideal starting point for data-scientists who want to use plotly-resampler in their day-to-day jupyter environments.
24
17
25
18
Additionally, this notebook also shows some more advanced functionalities, such as:
26
19
* Retaining (a static) plotly-resampler figure in your notebook
@@ -30,7 +23,7 @@ Additionally, this notebook also shows some more advanced functionalities, such
30
23
31
24
### 1.2 Figurewidget example
32
25
33
-
The [figurewidget example notebook](figurewidget_example.ipynb) utilizes the `FigureWidgetResampler` wrapper to create a `go.FigureWidget` with dynamic aggregation functionality. A major advantage of this approach is that this does not create a web application, thus not needing to be able to create / forward a network port.
26
+
The [figurewidget example notebook](figurewidget_example.ipynb) utilizes the `FigureWidgetResampler` wrapper to create a `go.FigureWidget` with dynamic aggregation functionality. A major advantage of this approach is that this does not create a web application, avoiding starting an application on a port (and forwarding that port when working remotely).
34
27
35
28
Additionally, this notebook highlights how to use the `FigureWidget` its on-click callback to utilize plotly for large **time series annotation**.
36
29
@@ -48,7 +41,7 @@ which `plotly-resampler` is integrated
48
41
|**advanced apps**||
49
42
|[dynamic sine generator](dash_apps/11_sine_generator.py)| exponential sine generator which uses [pattern matching callbacks](https://dash.plotly.com/pattern-matching-callbacks) to remove and construct plotly-resampler graphs dynamically |
50
43
|[file visualization](dash_apps/12_file_selector.py)| load and visualize multiple `.parquet` files with plotly-resampler |
51
-
|[dynamic static graph](dash_apps/13_coarse_fine.py)| Visualization dashboard in which a dynamic (i.e., plotly-resampler graph) and static graph (i.e., go.Figure) are shown (made for [this issue](https://github.com/predict-idlab/plotly-resampler/issues/56)). Graph interaction events on the coarse graph update the dynamic graph. |
44
+
|[dynamic static graph](dash_apps/13_coarse_fine.py)| Visualization dashboard in which a dynamic (i.e., plotly-resampler graph) and a coarse, static graph (i.e., go.Figure) are shown (made for [this issue](https://github.com/predict-idlab/plotly-resampler/issues/56)). Graph interaction events on the coarse graph update the dynamic graph. |
Copy file name to clipboardExpand all lines: examples/basic_example.ipynb
+13-19Lines changed: 13 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
"outputs": [],
9
9
"source": [
10
10
"%load_ext autoreload\n",
11
-
"%autoreload 2\n"
11
+
"%autoreload 2"
12
12
]
13
13
},
14
14
{
@@ -23,7 +23,6 @@
23
23
"\n",
24
24
"import plotly.graph_objects as go\n",
25
25
"from plotly.subplots import make_subplots\n",
26
-
"from datetime import datetime\n",
27
26
"\n",
28
27
"from helper import groupby_consecutive\n",
29
28
"\n",
@@ -344,7 +343,7 @@
344
343
" <li>we add a unique _uid to each object</li>\n",
345
344
" <li>we add a new endpoint to the underlying flask app that</li><ul>\n",
346
345
" <li>is only accessible via the corresponding app its _uid</li>\n",
347
-
" <li>hasCORS rights for any origin and 'Content-Type' headers</li>\n",
346
+
" <li>has CORS rights for any origin and 'Content-Type' headers</li>\n",
348
347
" </ul>\n",
349
348
" <li>Note that this is the only CORS endpoint of the JupyterDash app & is only preset when \"inline_persistent\" is used!</li>\n",
350
349
" <li>we check in the JavaScript output of the notebook cell whether that endpoint is reachable and emits the expected message (i.e., \"Alive\")</li><ul>\n",
@@ -461,7 +460,7 @@
461
460
"* restart the kernel; and reopen this notebook\n",
462
461
"* export this notebook to html\n",
463
462
"\n",
464
-
"ou should see a static (aggregated) image of the above figure"
463
+
"you should see a static (aggregated) image of the above figure"
465
464
]
466
465
},
467
466
{
@@ -506,8 +505,8 @@
506
505
"id": "6bffa11a",
507
506
"metadata": {},
508
507
"source": [
509
-
"now we adjust the figure data \n",
510
-
"**note**: after running the cell below, we need to manually trigger a graph update (by for example zooming / resetting the axes) to ensure that the new data is shown."
508
+
"Now we adjust the figure data \n",
509
+
"**Note**: after running the cell below, we need to manually trigger a graph update (by for example zooming / resetting the axes) to ensure that the new data is shown."
511
510
]
512
511
},
513
512
{
@@ -547,8 +546,8 @@
547
546
"id": "22687274",
548
547
"metadata": {},
549
548
"source": [
550
-
"now we adjust the figure data \n",
551
-
"**note**: after running the cell below, we need to manually trigger a graph update (by for example zooming / resetting the axes) to ensure that the new data is shown."
549
+
"Now we adjust the figure data \n",
550
+
"**Note**: after running the cell below, we need to manually trigger a graph update (by for example zooming / resetting the axes) to ensure that the new data is shown."
552
551
]
553
552
},
554
553
{
@@ -566,7 +565,7 @@
566
565
"id": "f4130fac",
567
566
"metadata": {},
568
567
"source": [
569
-
"**pro tip**: `FigureWidgetResampler` has the `reload_data` and `reset_axes` methods to do this automatically"
568
+
"**Pro tip**: `FigureWidgetResampler` has the `reload_data` and `reset_axes` methods to do this automatically"
0 commit comments