Hello
I'm developing C++ application which is able to plot data as function of time using various data sources (databases, devices, etc). So far, my data consisted of time/value pairs only, so it was simple: I'd make one plot for each data "channel" and use Plot::PlotXvsY function.
Yesterday I got new device I have to plot data from, and it returns data as triples: time/value/status. Status is simple boolean Success or Failure, as this device (gas meter using proprietary protocol) can sometimes fail during data acquisition. Such failure is also important event and should be (somehow) visually marked.
My first thought was to make simple "holes" or "broken areas" on plot. You know: first three samples are OK so line connects them, fourth to eight ones are bad so no lines here, line starts again at the ninth sample and continues...and so on. Unfortunately, I found out (looking at the documentation and searching forums here) that this is not possible.
After several hours of thinking, digging in forums and documentation and playing with CNiGraph I came up with following solutions:
Solution #1:
Use several plots with same color, instead of one, to provide visual "holes" in plot. Big disadvantage of this solution is overhead caused by many plots. Say I have four channels of data, each of them has something about 100 "holes", I'd have to create about 400 plots!!!
Solution #2:
Use annotations to mark "begin of hole" and "end of hole" as many times as needed on single plot. This way I have humble number of plots but big number of annotations.
My questions are (and I'd be very grateful if someone more experienced than me, possibly CNiGraph developer could answer them):
1) Do I miss something? Maybe there's a better way, elegant and efficient solution #0 ? 🙂
2) Which solution (#1 or #2) seems to be better one? I like #1 better, because this could give me "holes" I want.
3) Maybe I'm wrong but I have seen (somwhere on the forums) developer saying that similar feature is on some kind of CNiGraph to-do-list. How long I'd have to wait for this feature? How about beta versions (I'd gladly become a betatester)?
Best regards and thank you for your time
Michal