Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelquast committed Mar 23, 2023
1 parent bd87d99 commit a1c1da5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/example5.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
# define a callback that changes the values of the previously plotted dataset
# NOTE: this is not possible for the shapes: "shade_points" and "shade_raster"!
def callback(m, **kwargs):
# NOTE: Since we change the array of a dynamic collection, the changes will be
# reverted as soon as the background is re-drawn (e.g. on pan/zoom events)
selection = np.random.randint(0, len(m.data), 1000)
m.coll.set_array(data_OK.param.iloc[selection])

Expand Down

0 comments on commit a1c1da5

Please sign in to comment.