LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetAxisRange and logarithmic scale

I have function which zoom in graph. The graph has x- axis logarithmic. The problem is when i call function SetAxisRange with xmin and xmax parameters, the scale x-axis is always set up on all decade. For example: i need zoom between xmin=5 and xmax=20 but SetAxisRange set up xmin=1 and xmax=100.
Thanks for all ideas.
0 Kudos
Message 1 of 3
(3,057 Views)
Sir,
I think that that function will work correctly, unless I am misunderstanding your question. Your call might look something like this:
status = SetAxisRange (panelHandle, PANEL_CHART, VAL_MANUAL, 5.0, 20.0, VAL_NO_CHANGE, 0.0, 1.0);
This manually sets the xmin and xmax values. Let me know if I am misunderstanding your issue.

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,057 Views)
I think 🙂 that your call work well only if x-axis is not logarithmic. I send short example as attach file in which i call:
status= SetAxisRange (panelHandle,PANEL_GRAPH, VAL_MANUAL, 5, 20, VAL_NO_CHANGE, 0.1, 0.5) and the result is that x-axis has xmin=1 and xmax=100 i.e. two decades. I need xmin=5 and xmax=20. :-))
0 Kudos
Message 3 of 3
(3,057 Views)