PDA

View Full Version : Help: Multiple Colours in one Qwt Curve



Wisley
13th March 2008, 03:21
Hi,

I am doing a realtime plotting of the graph.
However, I want to plot different colours from point a to point b during certain intervals.

Do I use the function below or?
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const

Thanks in advance
Wis

Uwe
13th March 2008, 07:19
You have to overload QwtPlotCurve::drawCurve and QwtPlotCurve::drawSymbols. Here you can split your paint operation, and assign different colors to your painter/symbol before you call the methods of the base class for each interval.

Uwe