LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

y-axis limit control

I would like to set the maximum and the minimum of the y-axis of a graph programatically.  I tried SetCtrlAttribute or considered SetPlotAttribute, but didn't work.  Of course, I can set it in the property window of the graph, but want to change the max and min in the program.  Can anyone shed light on this?  Thanks in advance.
0 Kudos
Message 1 of 2
(3,063 Views)
Hi scatjay,

You need to say something like:

// myMin and myMax are variables of type double that I have already declared which represent my minimum and maximum y-axis range values
SetAxisScalingMode (panelHandle, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_MANUAL, myMin, myMax);   

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 2
(3,058 Views)