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
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,8 @@ fig
106
106
**Note** that you can add dynamic aggregation to plotly figures with the `FigureWidgetResampler` wrapper without needing to forward a port!
107
107
* In general, when using downsampling one should be aware of (possible) [aliasing](https://en.wikipedia.org/wiki/Aliasing) effects.
108
108
The <b><astyle="color:orange">[R]</a></b> in the legend indicates when the corresponding trace is being resampled (and thus possibly distorted) or not. Additionally, the `~<range>` suffix represent the mean aggregation bin size in terms of the sequence index.
109
+
* 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/getting_started.rst
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,23 +76,26 @@ The gif below demonstrates the example usage of of :class:`FigureWidgetResampler
76
76
Important considerations & tips 🚨
77
77
----------------------------------
78
78
79
-
* When running the code on a server, you should forward the port of the :func:`FigureResampler.show_dash <plotly_resampler.figure_resampler.FigureResampler.show_dash>` method to your local machine.
79
+
* When running the code on a server, you should forward the port of the :func:`FigureResampler.show_dash <plotly_resampler.figure_resampler.FigureResampler.show_dash>` method to your local machine. :raw-html:`<br>`
80
+
**Note** that you can add dynamic aggregation to plotly figures with the :class:`FigureWidgetResampler <plotly_resampler.figure_resampler.FigureWidgetResampler>` wrapper without needing to forward a port!
80
81
* In general, when using downsampling one should be aware of (possible) `aliasing <https://en.wikipedia.org/wiki/Aliasing>`_ effects. :raw-html:`<br>`
81
82
The :raw-html:`<b><astyle="color:orange">[R]</a></b>` in the legend indicates when the corresponding trace is resampled (and thus possibly distorted). :raw-html:`<br>`
82
83
The :raw-html:`<astyle="color:orange"><b>~</b> <i>delta</i></a>` suffix in the legend represents the mean index delta for consecutive aggregated data points.
84
+
* 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 this issue `#49 <https://github.com/predict-idlab/plotly-resampler/issues/49>`_.
83
85
84
86
85
87
Dynamically adjusting the scatter data 🔩
86
88
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
89
88
-
The raw high-frequency trace data can be adjusted using the :func:`hf_data <plotly_resampler.figure_resampler.FigureResampler.hf_data>` property of the FigureResampler instance.
90
+
The raw high-frequency trace data can be adjusted using the :func:`hf_data <plotly_resampler.figure_resampler.FigureResampler.hf_data>` property of the plotly-resampler Figure instance.
89
91
90
92
Working example ⬇️:
91
93
92
94
.. code:: py
93
95
94
96
import plotly.graph_objects as go; import numpy as np
95
-
from plotly_resampler import FigureResampler
97
+
from plotly_resampler import FigureResampler
98
+
# Note: a FigureWidgetResampler can be used here as well
96
99
97
100
# Construct the hf-data
98
101
x = np.arange(1_000_000)
@@ -110,6 +113,14 @@ Working example ⬇️:
110
113
111
114
`hf_data` only withholds high-frequency traces (i.e., traces that are aggregated)
112
115
116
+
.. tip::
117
+
118
+
The ``FigureWidgetResampler`` graph will not be automatically redrawn after
119
+
adjusting the fig its `hf_data` property,. The redrawning can be triggered by
120
+
manually calling either:
121
+
122
+
* :func:`FigureWidgetResampler.reload_data <plotly_resampler.figure_resampler.FigureWidgetResampler.reload_data>`, which keeps the current-graph range.
123
+
* :func:`FigureWidgetResampler.reset_axes <plotly_resampler.figure_resampler.FigureWidgetResampler.reset_axes>`, which performs a graph update.
0 commit comments