Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 33eda1e

Browse filesBrowse files
committed
add selectors to guide
1 parent e3fe161 commit 33eda1e
Copy full SHA for 33eda1e

File tree

2 files changed

+34
-0
lines changed
Filter options

2 files changed

+34
-0
lines changed
+3Lines changed: 3 additions & 0 deletions
Loading

‎docs/source/user_guide/guide.rst

Copy file name to clipboardExpand all lines: docs/source/user_guide/guide.rst
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,37 @@ attributes of all events (table)
204204
Selectors
205205
---------
206206

207+
A primary feature of `fastplotlib` is the ability to easily interact with your data. Two extremely helpful tools that can
208+
be used in order to facilitate this process are a `LinearSelector` and `LinearRegionSelector`.
209+
210+
A `LinearSelector` is a horizontal or vertical line slider. This tool allows you to very easily select different points in your
211+
data. Let's look at an example: ::
212+
213+
import fastplotlib as fpl
214+
import numpy as np
215+
216+
# generate data
217+
xs = np.linspace(-10, 10, 100)
218+
ys = np.sin(xs)
219+
sine = np.column_stack([xs, ys])
220+
221+
fig = fpl.Figure()
222+
223+
sine_graphic = fig[0, 0].add_line(data=sine, colors="w")
224+
225+
# add a linear selector the sine wave
226+
selector = sine_graphic.add_linear_selector()
227+
228+
fig[0, 0].auto_scale()
229+
230+
fig.show(maintain_aspect=False)
231+
232+
.. image:: _static/guide_linear_selector.gif
233+
234+
235+
A `LinearRegionSelector` is very similar to a `LinearSelector` but as opposed to selecting a singular point of
236+
your data, you are able to select an entire region.
237+
207238
`ImageWidget`
208239
-------------
209240

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.