SharpPlot Reference > SharpPlot Properties > IndexOrigin Property

SharpPlot.IndexOrigin Property

The Index origin property allows you to set the ‘index origin’ of a generated x-scale. This is 1 by default, but could be 0 which is good for surface filled charts as the auto-ranging of the axis often forces it to include 0, and the surface looks ugly when it does not fill right back to the y-axis.

public double IndexOrigin {get; set;}

Example

sp.IndexOrigin = 0;

Although 1 and 0 are the normal values, IndexOrigin can take any integer (such as 36967 which is the OLE date value for 17th March, 2001) for date labelled axes where the data is daily from a given start date. To have the data-points set midway between ticks, use a value of 0.5 here and set the tick interval on the X-axis to 1.

See also ...

SharpPlot Members | SharpPlot.SetXTickMarks Method


Send comments on this topic
© Dyalog Ltd 2021