10-23-2009 05:12 PM
Ok, it makes sense.
Apart a possible typo in writing: I have expected that stress (the quantity driving the phenomenon) is on the X-axis, while strain (the effect, or derived quantity) is on the Y-axis.
You could consider to split your application in two parts: test execution and presentation of results.
09-14-2010 04:25 AM
Hi querty,
I appreciate that you've probably sorted this out and moved on by now, but I've just come across the same issue, and hence found your post. I've also found a way to do what you want fairly simply:
Retain the handle from your call to PlotXY.
When you are ready to update your plots, call:
SetPlotAttribute (hpanel, GRAPH, PlotHandle, ATTR_PLOT_XDATA, XDataArray);
SetPlotAttribute (hpanel, GRAPH, PlotHandle, ATTR_PLOT_YDATA, YDataArray);
RefreshGraph (hpanel, GRAPH);
XDataArray and YDataArray must be the same size and type as those used in your original plot.
Cheers
Crispie
09-14-2010 02:16 PM
Crispie,
Thanks for letting me know about your solution but I don't think it addresses the problem I was having. Your solution replaces an existing plot with another plot of the same size, I believe. But that's not what I was trying to do.
I was trying to extend an existing plot line with new data. For example, say you read 100 (x,y) data points from your data acquisition system. You plot these 100 points on a graph. You then read another 100 points from the data acquisition system. How do you use these 100 points to extend the existing plot? In other words, how do you create a continuous line consisting of 200 points without storing all 200 points. Two plots are required to do this as far as I can tell.
Extending a plot is not what the graph designers had in mind evidently. They designed charts for that purpose. But there are valid reasons for extending plot lines on a graph, I believe. The "inch worm" approach discussed previously is a little strange but it seems to work without significant undesirable side effects.
thanks!
09-15-2010 04:01 AM
Hi querty,
Ah - I hadn't quite appreciated what you were trying to achieve.
I have a similar issue with my application in that all the data I wish to plot isn't available instantly. However, I've made my plot arrays large enough for the final plot, and I duplicate the last point, however many times are required to fill the array, so suppose I have 1000 points in my final array, and only 10 available at the start, I plot the last point 991 times. A little wasteful, but it's working fine.
Cheers
Crispie