QCustomPlot Discussion and Comments

Create a block wave from valuesReturn to overview

Dear,

Let's say I have the following data stream:

x = {0,1,2,3,4,5,6,7,8}
y = {0,1,0,1,0,0,1,1,1}

I wish to make Qcustomplot which looks like this: https://ibb.co/iXNg5f.
Is there a special type to make a graph like this? Or should I manualy device the x-axis an make the rising and falling edge my self?

Thanks in advance,
Kind regards,
Toon

the line style lsStepCenter or (if you want to optimize away points that don't change the logic level) lsStepLeft of QCPGraph produces this effect.

The line styles are showcased here:
https://www.qcustomplot.com/index.php/demos/linestyledemo