Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

formatannotation.pro


Routines

Routines from formatannotation.pro

result = remove_zeros(sval, ideallen=ideallen)
result = remove_leading_F(sval)
result = formatannotation(axis, index, value, data=data)

FUNCTION: formatannotationPURPOSE: This routine is used as a callback for axis labeling by IDLgrAxis Because it is a callback routine, IDL requires it to have this specific form.

Routine details

top source remove_zeros

result = remove_zeros(sval, ideallen=ideallen)

Parameters

sval

Keywords

ideallen

top source remove_leading_F

result = remove_leading_F(sval)

Parameters

sval

top source formatannotation

result = formatannotation(axis, index, value, data=data)

FUNCTION: formatannotation PURPOSE: This routine is used as a callback for axis labeling by IDLgrAxis Because it is a callback routine, IDL requires it to have this specific form. It is probably useful as a general purpose formatting routine, as well. Inputs: Axis:Required by IDL, but ignored Index: Required by IDL, but ignored Value: Required The value to be formatted. Data: Keyword,Required The data struct holds the important information and has the following format: data = {timeAxis:0B, $ ;Should we format as time data? formatid:0L, $ ;Precision of returned value in sig figs scaling:0B, $ ;0:Linear,1:Log10,2:LogN exponent:0B, $ ;(REQUIRED for non-time data)0:Auto-Format(see description),1:Numerical(double),2:Sci-Notation(1.2x10^3) range:[0D,0D],$ ; The range field is optional. If it is present in the struct, value will be interpreted a multiplier over the specified range.(generally this is used if the data is being stored as a proportion) noformatcodes:0b,$ ; Optional, set to 1 to disable IDL formatting codes like !U maxexplen:0L,$ ; Optional, if present and not equal -1 then exponents will be formatted to this length negexp:0B} ; Optional, if present 1 indicates presence of a negative exponent on axis (only considered if maxexplen is also set and not -1) Auto-Format: If the number being formatted is too large or small to be displayed with the requested number of significant figures then the number will be automatically displayed in scientific notation (e.g. for 3 sig. figs '1234.5' will be shown as '1.23x10^3' and '.00012345' will be shown as '1.23x10^-4') Values in log_10() space will be displayed as '10^1.2' Values in ln() space will be displayes as 'e^1.2' Integer formatting is not effected. Formatting Codes: Formatting codes are utilized to create superscripts and unicode characters that are displayd by IDLgraxis: !z(00d7): Unicode multiplication symbol !U : Superscripts the following substring Example: print,formatannotation(0,0,1,data={timeaxis:0,formatid:7,scaling:0,exponent:0}) 1.000000 print,formatannotation(0,0,.5,data={timeaxis:1,formatid:12,scaling:0,range:[time_double('2007-03-23'),time_double('2007-03-24')]}) 082/12:00:00.000 print,formatannotation(0,0,4,data={timeaxis:0,formatid:5,scaling:2,exponent:0}) e!U4.0000 print,formatannotation(0,0,.25,data={timeaxis:0,formatid:5,scaling:1,range:[1,2],exponent:0}) 10!U1.2500 print,formatannotation(0,0,1234,data={timeaxis:0,formatid:7,scaling:0,exponent:2}) 1.234000!z(00d7)10!U3 $LastChangedBy: egrimes $ $LastChangedDate: 2014-06-05 10:01:44 -0700 (Thu, 05 Jun 2014) $ $LastChangedRevision: 15308 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas/gui/utilities/formatannotation.pro $

Parameters

axis
index
value

Keywords

data

File attributes

Modification date: Mon Jun 9 05:58:59 2014
Lines: 319