IMSL C# Programmers Guide
|
2D Drawing Elements >> AxisXY >> Axis Unit |
|
Axis Unit
The AxisUnit node controls placing of a unit tag on an axis. The tag is the value
of the Title attribute in the node. By default, it is empty.
The axis unit is used for labeling only; it has no other effect on the chart.
Setting the Axis Unit
In this example, the axis unit for the x-axis is set to "hours" and the axis unit for the y-axis is set to "meters". While not required, the axis titles are also set.

(Download Code)
using Imsl.Chart2D;
public class SampleAxisUnit : FrameChart {
public SampleAxisUnit() {
Chart chart = this.Chart;
AxisXY axis = new AxisXY(chart);
double[] y = {4, 2, 3, 9};
Data data = new Data(axis, y);
axis.AxisX.AxisTitle.SetTitle(Time);
axis.AxisY.AxisTitle.SetTitle(Height);
axis.AxisX.AxisUnit.SetTitle(hours);
axis.AxisY.AxisUnit.SetTitle(meters);
}
public static void Main(string[] argv) {
System.Windows.Forms.Application.Run(new SampleAxisUnit());
}
}
| © Visual Numerics, Inc. All rights reserved. |
|