Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy scattergraph

I want to make a copy of my scattergraph to another scattergraph control.

Is there a way to do this?

Thanks,
ScottyO
0 Kudos
Message 1 of 4
(3,624 Views)
I am not exactly sure what it is you are trying to accomplish. If you would like to copy the data from one graph to another existing graph that has a plot object in it, you can use the GetXData and GetYData method of the ScatterPlot to copy the data. If you are trying to make a copy of the ScatterPlot object, then you can use the Clone method on the ScatterPlot to clone the plot object. You can also use clone to make copies of the axis, cursor, and annotation objects on your ScatterGraph. Cloning is not supported on the ScatterGraph, so there is no direct way to copy the graph object along with all its properties and sub-objects (such as the plots, axes, cursors, and annotations). You will have to save the non-default properties of the ScatterGraph you want to copy, create a new ScatterGraph object and manually set the properties on the new graph.
Abhishek Ghuwalewala | Measurement Studio | National Instruments
0 Kudos
Message 2 of 4
(3,619 Views)
Thanks. A better term to use would have been "clone". It's kind of difficult to clone the graph because sometimes there are one, two or three yaxis'.

ScottyO
0 Kudos
Message 3 of 4
(3,611 Views)


@Abhishek Ghuwalewala wrote:
I am not exactly sure what it is you are trying to accomplish. If you would like to copy the data from one graph to another existing graph that has a plot object in it, you can use the GetXData and GetYData method of the ScatterPlot to copy the data. If you are trying to make a copy of the ScatterPlot object, then you can use the Clone method on the ScatterPlot to clone the plot object. You can also use clone to make copies of the axis, cursor, and annotation objects on your ScatterGraph. Cloning is not supported on the ScatterGraph, so there is no direct way to copy the graph object along with all its properties and sub-objects (such as the plots, axes, cursors, and annotations). You will have to save the non-default properties of the ScatterGraph you want to copy, create a new ScatterGraph object and manually set the properties on the new graph.




By any chance you have a small example program for cloning WaveformPlot?
0 Kudos
Message 4 of 4
(3,555 Views)