Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract the plot from a graph ?

I m currently trying to add a capture button to a graph. The datas are added (charting) in real-time to the graph and the capture would copy (ploting) the plot to an other graph. Can I do that or should I better keep a copy of the points to be able to plot them ?

Thank you for helping
0 Kudos
Message 1 of 2
(3,064 Views)
You can use the GetXData and GetYData methods on the plot to get the data from the plot, then you could plot that data on a plot in another graph. For example, if you're using the WaveformGraph, you could do this:


double[] data = sourcePlot.GetYData();
targetPlot.PlotY(data);


Similarly, if you're using the ScatterGraph, you could do this:


double[] xData = sourcePlot.GetXData();
double[] yData = sourcePlot.GetYData();
targetPlot.PlotXY(xData, yData);


- Elton
0 Kudos
Message 2 of 2
(3,056 Views)