Custom Numeric FormatsOrigin-Formats
Origin supports custom formatting of numeric worksheet data, text objects, and axis tick labels, using the following options.
| Two zero control check boxes with the potential to override custom numeric formatting of axis tick labels, have been added to Options (Preference: Options: Axis):
- Zero is '0'
- No Trailing Zero
|
Numbers
Decimal Notation
Format
|
Description
|
Example
|
*n
|
Display n significant digits
|
71.46378651763725 using *5 ⇒ 71.464
|
.n
|
Display n decimal places
|
71.46378651763725 using .5 ⇒ 71.46379
|
*n*
|
Display n significant digits, truncating trailing zeros
|
30.95010 using *5* ⇒ 30.95
|
.n*
|
Display n decimal places, truncating trailing zeros
|
30.95010 using .3* ⇒ 30.95
|
.n,
|
Display thousand separator for the integer portion and specify n decimal places
|
12345.67890 using .2, ⇒ 12,345.68
|
.n?,
|
Align column decimals by adding n spaces after the decimal character. Optional "," adds thousands separator.
|
using .2?, ⇒ Align 2,396, 22.7 and 3.23
|
Scientific Notation
Format
|
Description
|
Example
|
P*n
|
Display n significant digits in scientific notation of the form 10^3
|
12345.67890 using P*5 ⇒ 1.2346x104
|
S*n
|
Display n significant digits in scientific notation of the form 1E3
|
12345.67890 using S*5 ⇒ 1.2346E+04
|
S.n[#]
|
Display n decimal places, in scientific notation of the form 1E3. The optional pound symbol "#" (square brackets indicate an optional flag) modifies the notation to display only the coefficient.
|
12345.67890 using S.5 ⇒ 1.23457E+04
|
Engineering Format
Format
|
Description
|
Example
|
E*n
|
Display n significant digits, in engineering format (e.g. 1.000k)
|
12345.67890 using E*5 ⇒ 12.346k
|
E.n
|
Display n decimal places, in engineering format
|
12345.67890 using E.5 ⇒ 12.34568k
|
Power Formats
Format
|
Description
|
Example
|
2.n
|
Display n decimal places, in power of 2 format
|
4294967296 using 2.32 ⇒ 1x232
|
L.n
|
Display n decimal places, in power of e format
|
1096.6331584282 using L.2 ⇒ 1.00xe7
|
Other Numeric Formats
Format
|
Description
|
Example
|
#n or ##
|
Display an integer to n places, zero padding where necessary. Or use n number of #'s to refer to nth places
|
1 using #2 ⇒ 01
12 using ### ⇒ 012
|
##+##
|
Display a number as two or more digits, a "+" separator, then two digits (e.g. surveying stations).
|
12345.67890 using ##+## ⇒ 123+46
|
#+##M
|
Display a number as number, a "+" separator, then two digits, plus suffix "M".
|
12345.67890 using #+##M ⇒ 123+46M
|
-+
|
Combine with other numeric formats (e.g. decimal places, significant digits, etc.) to display a "long minus" for negative and/or a "plus" symbol for positive numbers. Note that the "-" and "+" symbols may be used together (e.g. "-+") or separately (e.g. "-").
In the following example, we prefix "+" which forces display of a "+" sign for positive numbers, while specifying two decimal places.
|
71.4637865176 using +.2 ⇒ +71.46 km
|
Fractions
Format
|
Description
|
Example
|
# ##/##
|
Display a number as proper fraction. The first # indicates the integer part of the mixed number and the rest part after space indicates the remainder. In the reminder part, a forward slash / separates numerator and denominator. The numbers of # in both can be varied, indicating the number of digits of remainder. For example, # #/# displays remainder with up to 1 digit, # ##/## displays remainder with up to 2 digits, and so on.
|
71.4637865 using # ##/## ⇒ 71 32/69
|
# #/n
|
Round and display a number as a fraction with specified n as denominator. The numerator and denominator are separated by a forward slash /. The number of digits of numerator is adjusted accordingly.
|
71.4637865 using # #/8 ⇒ 71 4/8
|
Percentages
Format
|
Description
|
Example
|
#%
|
Display a number as a percentage.
|
0.714637865176373 using #% ⇒ 71%
|
#[.##]%
|
Display a number as a percentage with decimal place, truncating trailing zeros. while #.#% displays percentage as 1 decimal place and #.##% displays 2 decimal places.
|
0.021 using #.##% ⇒ 2.1%
|
#[.00]%
|
Display a number as percentage of 100 followed by the percent sign "%". #% displays percentage as integer, while #.0% displays percentage as 1 decimal place and #.00% displays 2 decimal places. Note that the square brackets in the format indicate an optional argument; they are not entered in your expression.
|
0.021 using #.00% ⇒ 2.10%
|
Note: From Origin 2024, percentage supports up to 12 decimal places. For example, you can specify #.####% to display 0.714637865176373 as 71.4638%.
|
pi
The quantity pi (π) is treated specially in the Origin worksheet. Once you have set the Column Properties Custom Display list to one of the pi options, you can enter multipliers directly (e.g. 1,2,3, etc.) and Origin will convert the display to pi units (e.g. π, 2π, 3π, etc.).
Format
|
Description
|
Example
|
* "pi"
|
Display a number as a decimal, followed by the symbol π.
Note that converting this value back to a simple Text & Numeric or Numeric format, displays a scaled decimal quantity (e.g. "2π" becomes "6.28319...").
|
1 using * "pi" ⇒ 0.31831π
|
#/4 "pi"
|
Display a number as π divided by "4", with rounding.
Note: If you click into the cell containing "3π/4", the cell displays the a decimal in π units ("0.75") in edit mode; but converting this column back to a simple Text & Numeric or Numeric format displays a scaled decimal quantity ("2.35619...").
|
1 using #/4 "pi" ⇒ π/4
|
#/# "pi"
|
Display a number as a fraction of π. See the note in the cell above.
|
1 using #/# "pi" ⇒ π/3
|
Other Prefix and Suffix Units
Format
|
Description
|
Example
|
"$"*
|
Display a number with a dollar sign ($) prefixed.
|
71.4637865176 using "$".2 ⇒ $71.46
|
*n "km"
|
Display a number to n significant digits, with the "km" (kilometers) suffixed.
|
71.4637865176 using *3 "km" ⇒ 71.5 km
|
| Origin's syntax for custom formats can sometimes be generalized. For instance, to display a number as dollars + cents (e.g. $2.50), you combine a "$" prefix with the ".n" notation from the first table to limit decimal display to 2 (i.e. "$.2").
|
Geographic Coordinate Notation
Format
|
Description
|
Example
|
DMS
|
Display a number in Degrees° Minutes' Seconds", where 1 degree = 60 minutes, and 1 minute = 60 seconds.
|
42.3251 using DMS ⇒ 42°19'30"
|
DMF
|
Display a number in Degrees Minutes Seconds, without unit symbols.
|
42.3251 using DMF ⇒ 42 19 30
|
D MDn EW (longitude) D MDn NS (latitude)
|
Display a number in Degrees and Decimal Minutes. Parameter n specifies decimal places. Positive values will have "E" or "N" appended, Negative values will have "W" or "S" appended. To preserve negative values do not append "EW" or "NS".
|
42.3251 using D MD3 NS ⇒ 42° 19.506 N
-72.6412 using D MD3 EW ⇒ 72° 38.472 W
-72.6412 using D MD3 ⇒ -72° 38.472
|
D MDn EWB (longitude) D MDn NSB (latitude)
|
Display a number in Degrees and Decimal Minutes. Parameter n specifies decimal places. Letter "B" ("before") specifies that positive values should have "E" or "N" prefixed, negative values will have "W" or "S" prefixed. To preserve negative values do not append "EWB" or "NSB".
|
42.3251 using D MD3 NSB ⇒ N 42° 19.506
-72.6412 using D MD3 EWB ⇒ W 72° 38.472
-72.6412 using D MD3 ⇒ -72° 38.472
|
Dn EW (longitude) Dn NS(latitude)
|
Display a number in Decimal Degrees. Parameter n specifies decimal places. Positive values will have "E" or "N" appended, Negative values will have "W" or "S" appended.
|
42.3251 using D3 NS ⇒ 42.325° N
-72.6412 using D3 EW ⇒ 72.641° W
Note: To display simply "42.3251" or "-72.6412", set Format = Numeric Display = Decimal:1000.
|
| Some experimentation can be useful for fine-tuning data display. For instance, you can display data as DMS or D<space>MS.
|
Date and Time
Display Julian Day value in date-time format
Format
|
Description
|
Example
|
Dn
|
Display in date format, using an Origin built-in Display format. Consult the list of built-in date formats and choose a format by specifying the index number (order) of the format in the Display list, starting from 0 (top entry in list is "D0").
|
2459858.7532012 (=date(10/6/2022 18:04:36.5837)) using
- D0 ⇒ 10/6/2022
- D2 ⇒ Oct 6
- D3 ⇒ 10/6
- D4 ⇒ 6
- D5 ⇒ Thu
- D7 ⇒ 2022
- D8 ⇒ 22
|
D<format>
|
Display in date-time format, using these Origin date-time format specifiers
|
2459858.7532012 (=date(10/6/2022 18:04:36.5837)) using
- DMM-dd-yyyy HH:mm:ss ⇒ 10-06-2022 18:04:26
|
Tn
|
Display in time format, using an Origin built-in Display format. Consult the list of built-in time formats and choose a format by specifying the index number (order) of the format in the Display list, starting from 0 (top entry in list is "T0").
|
2459858.7532012 (=date(10/6/2022 18:04:36.5837)) using
|
T<format>
|
Display in time format, using these Origin date-time format specifiers
|
2459858.7532012 (=date(10/6/2022 18:04:36.5837)) using
- TDDD:HH:mm:ss:## ⇒ 2459858:18:04:26:00
|
Month or Day of Week
Show month number (1-12) as month name in calendar. Show day of week number 1-7 as week name in calendar.
Format
|
Description
|
Example
|
CM0
|
3 char month name
|
12 using CM0 ⇒ Dec
|
CM1
|
full month name
|
12 using CM1 ⇒ December
|
CM2
|
1 char month name
|
12 using CM2 ⇒ D
|
CD0
|
3 char day of week name
|
6 using CD0 ⇒ Sat
|
CD1
|
3 full day of week name
|
6 using CD1 ⇒ Saturday
|
CD2
|
1 char day of week name
|
6 using CD2 ⇒ as S
|
Hexadecimal
Note: 32-bit display limited to 8 hex-digits not counting zero-padding, 64-bit to 13-hex digits not counting zero-padding.
Format
|
Description
|
Example
|
%x
|
32-bit, do not pad with zero. Lowercase "x" displays alpha hex characters as lowercase; "X" as uppercase.
|
16777215 using %x ⇒ ffffff
|
%#x
|
As above but prefix with "0x".
|
16777215 using %x ⇒ 0xffffff
|
%#0nx
|
As above but pad with zero, as needed, to n hex digits (incl. "0x").
|
16777215 using %#08x ⇒ 0xffffff
|
%#0NI64X
|
64-bit, pad with zero, as needed, to N hex digits (incl. "0X").
|
16777215 using %#014I64X ⇒ 0X000000FFFFFF
|
|