Simultaneous scaling ViewBox elements

Heads up! You've already completed this tutorial.

rbelyalov21065391 | 2020-07-15 08:18:11 UTC | #1

Hi, I would like to have several signal graphics (ViewBox elements) being scaled at the same time (not each one in its own area) without merging them into one shared area. Any ideas?

Thanks

vb|321x243


Luca | 2020-07-18 10:57:15 UTC | #2

https://www.pythonguis.com/courses/graphics-plotting/plotting-pyqtgraph/ There is the "plotting multiple line section".


martin | 2020-07-19 20:11:46 UTC | #3

Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PyQt6 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!

More info Get the book

Hey @rbelyalov21065391 welcome to the forum. I'm not sure I understand what you mean exactly --

By not merging them into one shared area do you mean you want to keep the individual plots distinct? But you want them all to share the same magnitude scale?

The complete guide to packaging Python GUI applications with PyInstaller.
[[ discount.discount_pc ]]% OFF for the next [[ discount.duration ]] [[discount.description ]] with the code [[ discount.coupon_code ]]

Purchasing Power Parity

Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]

If that's what you're after, I think the easiest solution would be to calculate the scale yourself (find the min/max of your data) and then apply that same scale to all the plots.

If instead you want to lock the x (or y) axis together across multiple plots, take a look at .setXLink() and .setYLink() on the ViewBox object. This allows you to link panning/scaling of plots together.

PyQt/PySide 1:1 Coaching with Martin Fitzpatrick — Get one on one help with your Python GUI projects. Working together with you I'll identify issues and suggest fixes, from bugs and usability to architecture and maintainability.

Book Now 60 mins ($195)


Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak
Martin Fitzpatrick

Simultaneous scaling ViewBox elements was written by Martin Fitzpatrick .

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt. Martin founded PythonGUIs to provide easy to follow GUI programming tutorials to the Python community. He has written a number of popular https://www.martinfitzpatrick.com/browse/books/ on the subject.