>  Docs Center  >  Libraries  >  Motley  >  MGH_TF_LINEAR

MGH_TF_LINEAR

MGH_TF_LINEAR

Name


  MGH_TF_LINEAR

Purpose



  This function is designed for use with the TICKFORMAT and
  TICKFRMTDATA properties of IDLgrAxis. Given a real value, it
  applies a linear transformation & returns a string representing
  the result.

Calling Sequence


  Result = MGH_TF_LINEAR(Direction, Index, Value)

Positional Parameters


  Direction
    Axis direction, required by the TICKFORMAT interface but ignored.
  Index
    Axis index, required by the TICKFORMAT interface but ignored.
  Value
    The real value to be formatted.
  Level
    Level is the index of the axis level for the current tick value
    to be labeled. (Level indices start at 0.) This parameter takes
    its value from the dimension of TICKUNITS.

Keyword Parameters


  DATA
    Specify this keyword to control the linear transformation and
    format. The keyword value should be a structure with one or more
    of the tags "offset", "scale", "format" and "round". The default
    is equivalent to {offset: 0., scale: 1., format: '', round: 0}.

Return Value


  The function returns a scalar string representing:
      output = data.offset + data.scale * input
  If data.round is set to a 'true' value then this is rounded. The
  format is controlled by data.format. If this is not supplied a
  default format is generated by MGH_FORMAT_FLOAT.
###########################################################################
  This software is provided subject to the following conditions:
  1. NIWA makes no representations or warranties regarding the
    accuracy of the software, the use to which the software may
    be put or the results to be obtained from the use of the
    software. Accordingly NIWA accepts no liability for any loss
    or damage (whether direct of indirect) incurred by any person
    through the use of or reliance on the software.
  2. NIWA is to be acknowledged as the original author of the
    software where the software is used or presented in any form.
###########################################################################

Modification History


  Mark Hadfield, 1999-05:
    Written.
  Mark Hadfield, 2001-03:
    Merged changes by George Constantinides to take advantage of
    multi level axis of IDL 5.4
  Mark Hadfield, 2001-05:
    Added rounding via the "round" tag in DATA. I might generalise
    this some day.
  Mark Hadfield, 2003-01:
    Now accepts a "floor" tag in DATA.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us