QCustomPlot Discussion and Comments

Graph mess when graph have various points on same x positionsReturn to overview

Hello guys,

First off, I want to thank you all guys for such a good widget. It has been really easy for a newbie like me to plot using QCustomPlot with Qt to plot graphs than any other libraries I tried.

Everything is smooth & working perfectly as expected except one thing, if my graph have several points on y-axis with same x-axis points (as indicated in the photo: https://s7.postimg.org/ego6brgmj/bezier.png) the graph doesn't plot as it should. Can anyone kindly point me the right direction to figure this out?

Thanks

I want to add one more thing that x/y co-ordinates (during overlapped region) might not be exact same as I am calculating with double precision.

And if I separate overlapping region into two different graphs, then it plots perfectly fine: https://s13.postimg.org/sky2bqm93/bezier2.png, the blue and red graph.

Use QCPCurve instead of QCPGraph:
http://www.qcustomplot.com/documentation/classQCPCurve.html#details

"Unlike QCPGraph, plottables of this type may have multiple points with the same key coordinate, so their visual representation can have loops. This is realized by introducing a third coordinate t, which defines the order of the points described by the other two coordinates x and y."

Thank you so much Isso. This turned out pretty well & QCPCurve is working exactly as I want it to be.

Thanks again, you saved my day :)