Dual axes, different scales for both x and y

20 views
Skip to first unread message

James

unread,
Jun 5, 2021, 5:10:23 PM6/5/21
to pyqtgraph
Hi,

I'm trying to superimpose two curves, where each curve has different x and y scales.
In particular, one curve is voltage vs. time, the other is amplitude vs. frequency.

What is currently the recommended way to do this in pyqtgraph?

Thank you,
James

Ognyan Moore

unread,
Jun 5, 2021, 5:41:56 PM6/5/21
to pyqt...@googlegroups.com
Hi James,

I must say this is one of our most requested features.  You can do this right now within the library, but it takes some work.  The general process is you overlap viewboxes, each viewbox has its own scaled coordinate system.  This gets problematic with mouse interactions (which viewbox should zoom in?).

Depending on your comfort level with adventure; there is an open pull-request to have more support fhir this feature here: https://github.com/pyqtgraph/pyqtgraph/pull/1359

The owner of the branch there routinely syncs up his branch with master, so that branch isn't particularly out of date.  If you're up for it, we'd love your input on that PR.

Sorry I don't have a better answer for you here.

Ogi

--
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/905fa432-7df2-4dc1-bdf4-4db6374bdf43n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages