Interactive zoom using mouse?

31 views
Skip to first unread message

JJ

unread,
May 17, 2019, 7:30:49 AM5/17/19
to pyqtgraph
How can I override the default mouse left click behavior that pans the plot and implement a zoom to the area selected by the mouse. More specifically, I would like to implement the following:

  • Left click to define zoom start
  • Drag to define a rectangular zoom area. A  filled rectange should be rendered on the screen while the zoom area is being defined.
  • Click release to define zoom end. The plot now zooms to the defined area.

Rollins, Jameson

unread,
May 17, 2019, 10:55:29 AM5/17/19
to JJ, pyqtgraph
On Fri, May 17 2019, JJ <surf...@gmail.com> wrote:
> How can I override the default mouse left click behavior that pans the plot
> and implement a zoom to the area selected by the mouse. More specifically,
> I would like to implement the following:
>
>
> - Left click to define zoom start
> - Drag to define a rectangular zoom area. A filled rectange should be
> rendered on the screen while the zoom area is being defined.
> - Click release to define zoom end. The plot now zooms to the defined
> area.

What you are describing is currently available as "1 button" mouse mode,
and is available via the left-click context menu under "Mouse Mode".

jamie.
Reply all
Reply to author
Forward
0 new messages