Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Can plot axes be adjusted on a plot that is filled with data?

When trying to programmatically set the max and min values for a graph axis, I find that I have to clear the plots first or the new values will not take effect. Am I missing something here? It seems that you should be able to set axes parameters when the graph buffer is filled or empty.

Thanks in advance.

Wayne
0 Kudos
Message 1 of 2
(2,857 Views)
I'd have to see some code to see what's going on in your case. I created a new project, added a graph to the dialog, added a member variable for the graph called m_graph, and the following code works for me:

// Plot some data.
CNiReal64Vector data;
CNiMath::SineWave(data, 100, 1.0);
m_graph.PlotY(data);

// Set the values min and max values of the graph axis.
m_graph.Axes.Item(1).SetMinMax(0, 200);

Please try this and see how it works. If this doesn't address your problem, please post some sample code that demonstrates your problem. Hope this helps.

- Elton
Message 2 of 2
(2,857 Views)