QCustomPlot Discussion and Comments

QCPColorGradientReturn to overview

Sorry for the repeated question. But how can I achieve the result: Suppose my data to display lies in the range from 10 to 50. I want the color of my data to be like this: from 10 to 30 is green, from 31 to 40 is yellow and from 41 to 50 the color is red. I want there to be no interpolation and have solid colors: green, yellow and red. How can I achieve this result? Because I have tried all possible options and I can't achieve this result.

Of course, I display the data on QCPColorMap.

Please help

have you tried creating a new QCPColorGradient with the color stops you need?

Everyting you need is on this page: https://www.qcustomplot.com/documentation/classQCPColorGradient.html

yes i tried it doesn't work

help please =(

What does not work precisely? Can you be a little bit more specific and show for example your code so that we can help you?