LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a sensible Y-scale on graph

Hi there,

Having a small graph display issue which I can't find any info about

Requirements:

Display 3 sig.fig. or 2dp in scientific format, with a wide range of possible values from 10^-5 to 10^-9, which suggests autoscaling is best.

Data comes with at least 5 s.f., but the accuracy, resolution and dynamic range means that only 2-3 s.f. are useful.

My current settings leave a poor graph representation. Too many repeated values on the Y-scale. For this example, it would be better to just show 1.57E-6 and 1.58E-6 where they are instead of rounding all the markers. Graph.png

 

Sample data attached to play with. Will need to also work when you multiply up/down by 10/100/1000 etc.

 

Thanks in advance for any ideas

Ian
LabVIEW since 2012
0 Kudos
Message 1 of 4
(2,523 Views)

Hi Ian,

 

the graph does what you requested:

- do Y autoscaling to fill plot area

- do format the values on Y axis as requested with just 2 significant figures

 

You might determine the range of your data (in your example image ~2E-9) and set the format string for the Y axis accordingly. Or you try to implement a better autoscaling by setting Y axis min/max on your own…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,513 Views)

Looks like I'm going to resort to rounding the data to 3sf before plotting. Couldn't see a function, I guess something like this is best...

 

snip.png

Should be easier than changing the implementing my own autoscaling. Will just have to check that no one minds that I round all the data Smiley Wink

Ian
LabVIEW since 2012
0 Kudos
Message 3 of 4
(2,485 Views)

Hi Ian,

 

You can do it with 2 primitives if you like:

 

temp.png

Message 4 of 4
(2,460 Views)