LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetAxisScalingMode does not seem to autoscale properly for small values

Hello,

 

it sounds like a simple problem == stupid error, but so far I couldn't localize it. I have a XY plot on a XY graph. If the Y values are small, say a data range from 0 to 0.08, the autoscaling does not seem to work properly, i.e. the maximum axis value is set to 1.0 although the maximum data value is 12 times smaller.

 

 I have found this discussion but I have not used loose fit, see the screen shot of my panel settings below.

 

So, when I call SetAxisScalingMode ( PANEL, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_MANUAL, 0.0, 0.08 ); I do get the approximately correct range, however, using SetAxisScalingMode ( PANEL, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_AUTOSCALE, 0.0, 0.0 ); yields an axis range of 0.0 ... 1.0.

 

Suggestions?

 

Thanks,

Wolfgang

 

 

 

graph settings.png

0 Kudos
Message 1 of 4
(2,996 Views)

This sounds a bit strange to me. Do you observe the same behaviour when you increase the precision of your Y Axis (changint it from Auto to 2 digits for example)?

 

Best regards 

______________
Florian Abry
Inside Sales Engineer, NI Germany
0 Kudos
Message 2 of 4
(2,987 Views)

Hi Wolfgang,

 

That is certainly not the expected behavior.

 

It would have been exactly the expected behavior if you had "Loose fit" enabled, with loose units set to  2. I notice that the loose fit units is set to 2, however loose fit itself is disabled, so I can't explain it. I'm only mentioning it so that you could try a few tests with and without loose fit enabled to see if that's where the problem is.

 

Assuming that doesn't help, if you can attach something that reproduces the problem, I'll take a look at it.

 

Luis

0 Kudos
Message 3 of 4
(2,980 Views)

Thanks for your comments and suggestions, Naity and Luis!

 

I completely agree that it sounds rather strange but so far I was unable to localize the problem Smiley Frustrated I have tried changing precision, loose fit etc. without luck.

 

What I can add is that I am using both Y axes, with the data plot usually assigned to the left axis. When I change the association to the right axis, autoscaling works. Autoscaling also works if the data range is large (typical amplitudes are >> 1).

 

I am afraid that I will have to prepare a demo... 

0 Kudos
Message 4 of 4
(2,968 Views)