PDA

View Full Version : QWtPlotCurve with possibility of not drawing certain samples?



Khaine
1st April 2016, 13:17
I want to ask how can I achieve following objective:

When I draw my samples on the plot some of them may be tagged as "invalid". In data model every sample is represented by double value being actual value and bool value informing if sample is correct. If sample is incorrect I would like it to not appear AT ALL on the plot. So for example I picked my current samples, and I want to draw them. Unfortunately samples 10-20 are invalid, and I would like them to not appear. Just "hole" in the plot. Normally I would need to create 2 QwtPlotCurves. One with values 0-9 and second one with 11+. But what if there will be hundreds of such areas? And also with for example 20 "big" curves? It's rather bug-friendly situation. Maybe there is some way to tell QwtPlotCurve, that I don't want some things to be displayed? Or another class that will allow such things.

11844

Also I would like to know how can I paint such red area for invalid samples. When samples are invalid, I would like to mark them like that.