QCustomPlot Discussion and Comments

Multi-Colored Lines in QCustomplot?Return to overview

I was wondering if it is possible in QCustomplot to create a plot where the color of the plot line is dependent on the value of the data at its respective "section" in the line. For example, something like this.

Interesting question.

Something similar can be done as described here:
https://forum.qt.io/topic/7997/solved-multi-colored-polylines
https://stackoverflow.com/questions/9129955/draw-a-multi-colored-line-in-qt

It seems that QPainter does not have a suitable API for this task.