Axis Label

The AxisLabel node controls the labeling of an axis. Axis1D.AxisLabel should be used to set the AxisLabel attributes. The drawing of this node is controlled by the Text Attributes.

Scientific Notation

If the values along an axis are large, scientific notation is more readable than a dec­imal format with many zeros. In this example the y-axis is labeled with scientific notation where each number has exactly two fractional digits displayed. Use axis.AxisY.AxisLabel.TextFormat and for­mat pattern, "0.00E0". See Formatting Types in the .Net Framework Developer’s Guide for details on number formatting pattern.

Date Labels

If the TextFormat attribute for an axis is set to a date format, then the axis is scaled and labeled as a date/time axis instead of as a real axis.

Date information passed to the Data constructor must be a double or long, usually obtained from the Ticks property of a DateTime instance.

Skipping Weekends

An additional feature of Date axes is the ability to skip weekends. This feature is often needed for charting stock price data.

To skip weekends it is necessary to adjust the autoscaling for weekdays-only. This is done by setting the attribute SkipWeekends to true. It is also necessary to set a custom transformation, TransformDate, on the axis. This is shown in the fol­lowing example, which is a modification of the example in the previous section.

Skipping weekends is intended only for data sets where no weekend data exists. It will not give the expected results if the data set contains weekend data.

String Labels

Any array of strings can be used to label the tick marks using the SetLabels(String[]) method. The SetLabels(String[]) method sets the Number attribute to the number of strings.



Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260