PDA

View Full Version : Draw a curve with multiple colors (dot by dot??)



jiapei100
13th January 2010, 11:33
Hi, all:

I'm writing to ask how to use QWT to draw a curve with multiple colors???

Say, I've got a 2D curve, say, y = f(x), both x and y are natural number.
x is the time index, it starts from 1 and till 1000 ( milliseconds)
and y is a number calculated with the time goes by. it varies from 1 to 20 .


I want to realize something like:

x from 1 to 100, draw red dots
x from 101 to 500, draw yellow dots
x from 501 to 990, draw red dots again
x from 991 to 1000, draw blue dots.


So, how can I realize that?


Best Regards
JIA

Uwe
13th January 2010, 17:21
Use 4 curves with different pens - or probably better: overload YourCurve::drawCurve().

Uwe