Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph - I clear data, change axis, and graph flashes old data

CCWPlot Plot;

CCWAxis AxisX, AxisY;

 

Plot = GetPlots().Item(...);

Plot.SetVisible(false);

Plot.ClearData();

 ... calculate min and max for axes.

AxisX = GetAxes().Item(GRAPH_AXIS_X);

AxisX.SetMinMax(...);

AxisY = GetAxes().Item(GRAPH_AXIS_Y);

AxisY.SetMinMax(...);

... build x and y data

PlotXvsY(...);

Plot.SetVisible(true);

 

Problem, the second time this code runs, the axis changes, and the graph breafly flashes the old data (which should be cleared) on the new axis, and then displays the new data correctly. I cleared the old data from the plot before changing the axis min and max, so why is the graph flashing the the old data on the graph and what can I do to prevent this?

0 Kudos
Message 1 of 2
(6,274 Views)
I found the problem in other code that was adding data to the graph. So no problem.
0 Kudos
Message 2 of 2
(6,252 Views)