QCustomPlot Discussion and Comments

line plot with nan value.Return to overview

    QVector<double> x = {1, 2, 3, qInf(), 9,10,11};
    QVector<double> y = {2, 3, 4, qInf(), 10, 11, 12};
    chart->graph()->setData(x, y);

I got a continuous line with the code but I want there is a interrupt here. How can I do it?
I want the line just like this:
https://imgur.com/a/RWBe6Fq

you have to use NaN instead of Inf.
I guess either the std version or qQNaN() will work.