Overlaying multiple plots
Posted: Sun Nov 08, 2009 4:49 am
Hi all,
Before I carry on I have to say DPLOT is a fantastic tool!
I have recently found out about using dplotlib in c# and now am trying to add some real-time plotting capabilites to some automatic test software.
What I would like to do is plot an array of data (histogram of levels of an ADC output, 16 levels in total). This histogram is updated at a specific rate.
I use this every time I get new data on the ADC statistics: -
for (int i = 0; i < 16 i++)
{
x = i;
y1 = AdcBins;
dplot.DPlot_AddData8(DocNum, dplot.DATA_XYXY, 1, 1, ref x, ref y1);
}
Now the problem I encounter is the plot wraps back on itself, basically the last point joins back to the start point after each update.
There are two options I would like to try:
1. Is just show one plot at each update. In other words clear the last plot and show the new one but do it quickly without recreating the axis etc.
2. Also to plot each new plot over the other not clearing the previous one but not to have the wrapping of last point to first.
I hope this makes a bit of sense.
Kind regards,
M.
Before I carry on I have to say DPLOT is a fantastic tool!
I have recently found out about using dplotlib in c# and now am trying to add some real-time plotting capabilites to some automatic test software.
What I would like to do is plot an array of data (histogram of levels of an ADC output, 16 levels in total). This histogram is updated at a specific rate.
I use this every time I get new data on the ADC statistics: -
for (int i = 0; i < 16 i++)
{
x = i;
y1 = AdcBins;
dplot.DPlot_AddData8(DocNum, dplot.DATA_XYXY, 1, 1, ref x, ref y1);
}
Now the problem I encounter is the plot wraps back on itself, basically the last point joins back to the start point after each update.
There are two options I would like to try:
1. Is just show one plot at each update. In other words clear the last plot and show the new one but do it quickly without recreating the axis etc.
2. Also to plot each new plot over the other not clearing the previous one but not to have the wrapping of last point to first.
I hope this makes a bit of sense.
Kind regards,
M.