## scale units | Welcome Gallery Handbook |
| Manual page for scale_units(PL)

## DESCRIPTION

A number of types of scaling units may be used when plotting data. They are described here.``

## EXAMPLES

A number of examples illustrating the various scale types may be veiwed from the Gallery Scaling and Axes page

## ABSOLUTE UNITS

Absolute units are not used for plotting data but rather for defining plot areas and for purposes such as placing annotation, etc. Absolute space is measured in inches (or centimeters if set in the config file). The origin (0,0) is always at the lower-left corner.``

## DATA SCALING UNITS

A number of scaling units are available.`` Scaling is set in proc areadef or in proc defineunits.``

The following are the available types of scaling.`` For each type a description is given. Each type also has one or more display format specifications, which determine how incremental stubs will be presented.``

## LINEAR

Standard linear numeric scale.`` Numeric values may be any mixture of integer or floating point (exponential/scientific notation e.g. 4.336e11 is supported as of version 1.37).`` Linear scaling is used for plotting continuous numeric data; it may also be used with series, such as bars when no location value is present in the data, or lineplots when no X value is present in the data.``

Display format: Display of numerics is controlled using a printf-spec

## LOG

Logarithmic numeric scale.`` Numeric values may be any mixture of integer or floating point (exponential/scientific notation is supported as of version 1.37).`` The log of 0.0 or of negative numbers is nonexistant; therefore log plots should have a minima > 0 (very small numbers such as 0.01 are OK).``

Also available is log+1 scaling, which is similar to log but uses `log( value+1 )`. This is useful for log-characteristic data that can include values at or near 0.0.``

If using log scaling along with autorange, and if values of 0.0 are found, log+1 scaling will automatically be used.``

Display format - same as linear, above.``

The proc axis `stubcull` attribute may be useful in eliminating "stub pile-up" when rendering log axes.``

## CATEGORIES

Positioning by category. This scaling method differs from the others in that it does not use a continuous scale.`` It is useful in positioning bars, rangebars, 1-D scatterplots or symbols based on a value or category.`` Values are considered labels and may be anything-- they may even contain embedded spaces and `\n`.`` No proc areadef range information should be specified; instead, the categories are enumerated in an areadef `xcategories` or `ycategories` attribute.`` Data are categorized by comparing with all category labels until a match is found.`` The details of how this comparison is actually done can be controlled using areadef attribute `catcompmethod`.``

Display format - the defined category names.``

## DATE

Allows date information to be plotted directly. A number of date notations , including year/month and quarter year notations, are supported for plotting and date arithmetic.``

Display format: Dates may be displayed in any of the supported date arithmetic formats, or in a number of additional display formats

The basic date unit is always a day, regardless of which notation is in use. Stub and tic increments may be expressed in `months` or `years`, if desired.``

## TIME

Allows date information to be plotted directly. Several time formats are supported for plotting and time arithmetic.``

Display format: Times may be displayed in any of the supported time arithmetic formats.``

The basic time unit is a minute.``

## DATETIME

Allows time information to be plotted across multiple days.`` A datetime data field should have the format date.time (i.e. the date and time are connected using a dot). If your data has the date and time in two separate fields, the proc getdata `filter` attribute may be used to connect them with a dot.``

The date and time formats may be any of those supported for plotting and arithmetic.`` For example, if your datetime fields are like this: `22Aug1999.16:44` you would specify the datetime format as `ddMmmyyyy.hh:mm`.``

Display format: Same as above, except that the date component or the time component may be omitted if desired.``

The basic datetime unit is a day.``

An example of datetime scaling is in hitcount (Introduced in version 1.3)

## DATETIME WITH TIME WINDOWING

Sometimes it is desirable to show only portions of each day, when showing the entire 24 hour day would be too much. Examples of this include a work day or a trading day. datetime scaling allows you to do this- you can indicate the time range for each day at the end of the datetime keyword.`` For example:

  `datetime9-17`
  would show only the hours from 9:00 to 17:00 for each day.

Rules: Only whole hours may be used in the time window definition.`` Time values that are outside the defined time window will be displayed at the time window boundary and a warning will be issued. The areadef range must contain time components that are within the time window range. Incremental axis labels in day units may be used, but hour units may not be used.``

An example of datetime scaling with time window is in hitcount3 (Introduced in version 1.3)

## PLTAB

Used only with the pltab utility. Similar to categories type (see above).`` When pltab scaling is in effect, plottable values in Y correspond to row labels from the underlying table. Like the categories scale type, it is primarily useful in aligning bars etc.`` For example if the following table were being processed using pltab:

                   Dealerships

    NH - North Hills

    CV - Centerville

    DT - Downtown

``the value `CV` would be scaled in Y to align with the "Centerville" row.``

## PLTAB_ROW

Usage: pltab_row rowval

Used only with the pltab utility. Like pltab, except that it is used when aligning a 2-D plot such as a bargraph or lineplot to a row in the table. Effectively this embeds a small Y axis into a row in the table. rowval designates which row in the table to align with (in the above example, "CV" could be used for rowval).``
data display engine
Copyright Steve Grubb

Markup created by unroff 1.0, `` `` September 13, 2001.