QCustomPlot Discussion and Comments

How to create a logic analyzer plot ?Return to overview

Hi all,
i would like to build a "simple" logic analyzer plot, with one analog area and one digital area. If x-axis is zoomed or moved both, analog and digital area should be zoomed synchronous, but i have no idea how to start.
It would be nice to have something like that:

10 _---_ _-
adc _- -_-
-10 _-
clk -_-_-_-_-_-_-_-_
signal A -__-_-----___---
busy ___------____-__
0 1 2 3 4 5

Is there someone who can give me some help ?

Hello Mario,

I can't tell from your attempt at ASCII art :-), but what you describe is straight forward: connect the rangeChanged signal with the setRange slot of one x axis to the other and vice versa.

For the setup and arrangement you add a second axis rect for your digital data to the main plot layout. I believe with addElement()... the examples with multiple axes areas should help. And for the final touch the QCPMarginGroup helps you keep the y axes horizontally in line. Just looks better.

Gary

@Gary
Thanks for the hint !
I'll try and see if I can manage it.