Skip to content

Commit

Permalink
FIX: fix scrollbar demo and update docstring (#489)
Browse files Browse the repository at this point in the history
Co-authored-by: Poruri Sai Rahul <rporuri@enthought.com>
  • Loading branch information
xiaoyu-wu and Poruri Sai Rahul authored Jun 2, 2021
1 parent 345671b commit a600fc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/demo/basic/scrollbar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python
""" Plot with pan-zoom interaction.
""" Plot with scroll and pan-zoom interaction.
Draws some x-y line and scatter plots. On the left hand plot:
Draws some x-y line and scatter plots. On the plot:
- Scroll by dragging the scrollbar above the plot
- Left-drag pans the plot.
- Mousewheel up and down zooms the plot in and out.
- Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular
Expand Down Expand Up @@ -50,6 +51,8 @@ def _create_plot_component():
component=plot1, axis="index", resizable="h", height=15
)
plot1.padding_top = 0
# NOTE: scrollbar fails to display with index_range covering full range
plot1.index_range.high_setting = 1
hscrollbar.force_data_update()

# Create a container and add our plots
Expand Down

0 comments on commit a600fc2

Please sign in to comment.