LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change xy graph x scale precision

Solved!
Go to solution

Hello

very simply i need to have fixed  number of digit after decimal point .

I thought i can do it with :

X scale -> Display format precision 

but i have faced with this error :

 

Capture.JPG

 

As i scale programmatically scale x-axis (because having more margin) i try this way :

Capture2.JPG

 

convert float to string with desire precision and then convert it to float .

it works but i thought maybe ther is better way .

 

Best Regards 

Morteza

0 Kudos
Message 1 of 3
(3,714 Views)

I strongly recomment the SI format.  Any scale from 0 to any value with 9 digits resolution needed will be hard to read.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 3
(3,706 Views)
Solution
Accepted by topic author mori64

To set number of digits programmatically, you can use "Format string". It does not have 8 digits limit. You can check format strings when you switch to Advanced editing mode.

%#.2g - automatic formatting with 2 digits after decimal point. If you remove #, it will show trailing zeros.

"Increment" is a distance between major ticks. You can also kind of control it using format string by specifying minimum string width

"%-15.2g" - minimum width 15 digits, "-" fill with spaces on right, 2 digits of precision, show trailing zeros.

SI notation is good. 

%#_3pV instead of "0.00153" will show 1.53mV. 

Message 3 of 3
(3,655 Views)