Return to LAS FAQ

Axis lo/hi Defaults


How can I specify the lo/hi defaults on a time or depth axis.


It may occur that you will want to specify the default lo or hi axis values that will be presented to a user when they select a dataset. This is particularly useful when you have a time axis covering many years but the first data points begin somewhere in the middle of the first year rather than in January. Many users will select a variable and then "Get Data" without modifying the selected time. If the time axis defaults to January when the first available data is in April they will get an error message. This is both confusing and annoying.


To solve this problem you can use some (still undocumented) features of the axis definition in the dataset xml file. Here is an example:

    <my_data_TIME type="t" units="month" default="first"
display_lo="2000-Mar-15" display_hi="2007-Feb-15">
<arange start="2000-Jan-15" size="100" step="1"/>

The above example tells the interface what to display in the case when

  1. a range is needed: "2000-Mar-15" to "2007-Feb-15"
  2. a point is needed: use the "first" value (2000-Mar-15)

The 'default' attribute can be either "first" or "last" and the the 'display_lo' and 'display_hi' attributes should be specified as YYYY-Mon-DD for a T axis or numbers for a Z axis..

Note that the defaults are only used when the previously selected lo and hi values are outside the domain of available values for this axis.

Jonathan Callahan:
Last modified: September 27, 2001