Make graph unmovable

58 views
Skip to first unread message

Gene Beidl

unread,
Sep 1, 2019, 7:16:32 PM9/1/19
to pyqtgraph
When I click on any of the graphs with all the examples in the example code, the graphs move, updating the x and y axes.

I want to lock the graph in place and not float all about.  How can I make it unmovable?

Thanks!


vas...@gmail.com

unread,
Sep 1, 2019, 7:57:00 PM9/1/19
to pyqt...@googlegroups.com
Hi Gene,

You could try to do that with setXRange and setYRange functions:

Cheers,
Vasilije

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/f87d8b83-8c12-49a2-aa0c-571bb4ac9b82%40googlegroups.com.

vas...@gmail.com

unread,
Sep 1, 2019, 7:59:19 PM9/1/19
to pyqt...@googlegroups.com

Gene Beidl

unread,
Sep 2, 2019, 8:46:18 PM9/2/19
to pyqtgraph
Hi Vasilije,

Thanks for the answer.  The set range functions will zoom in or out to the dimensions given, but they don't stop the graph from being movable.  If you click on the graph, you can still move it around, which is really annoying to me.

I think there must be some other function I need to set.


On Sunday, September 1, 2019 at 7:59:19 PM UTC-4, vas...@gmail.com wrote:
On Sun, Sep 1, 2019 at 4:56 PM <vas...@gmail.com> wrote:
Hi Gene,

You could try to do that with setXRange and setYRange functions:

Cheers,
Vasilije

On Sun, Sep 1, 2019 at 4:16 PM Gene Beidl <gene...@gmail.com> wrote:
When I click on any of the graphs with all the examples in the example code, the graphs move, updating the x and y axes.

I want to lock the graph in place and not float all about.  How can I make it unmovable?

Thanks!


--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqt...@googlegroups.com.

vas...@gmail.com

unread,
Sep 2, 2019, 9:01:04 PM9/2/19
to pyqt...@googlegroups.com
You also could:
- set it to desired value at end of every loop (before calling processEvents()) 
- set some parameters with setLimits() function,
- use disableAutoRange()

To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/e2be7377-d566-4a67-8295-14b0139c62e6%40googlegroups.com.

Patrick

unread,
Sep 2, 2019, 11:15:09 PM9/2/19
to pyqtgraph
I think the function from ViewBox you are looking for is setMouseEnabled. So something like:

yourplot.getViewBox().setMouseEnabled(x=False, y=False)

Patrick

Gene Beidl

unread,
Sep 11, 2019, 11:54:34 AM9/11/19
to pyqtgraph
Thank you, Patrick.  I will give that a try.
Reply all
Reply to author
Forward
0 new messages