| Contents > SharpPlot > Methods | Index |
SharpPlot.SetXTickMarks Method
Set X tick marks given a tickmark specification.
Example
sp.SetXTickMarks(10); // Every 10
sp.SetXTickMarks(20,4); // Major,minor
sp.SetXTickMarks(new int[] {10,20,50,100}); // Exact placement
Overloads
- public void SetXTickMarks(double majorInterval);
- public void SetXTickMarks(int[] tickPlacement);
- public void SetXTickMarks(double[] tickPlacement);
- public void SetXTickMarks(double majorInterval,int minorTickCount);
The units of the major tick interval are normally just the units of the data, but there are some special cases when plotting time-related values. Axis styles which affect this calculation are:
- Date ticks are in days (as you would expect from the OLE date values) but part-days are fine
- Annual ticks are in whole years
- Monthly ticks are computed for you at month boundaries
- Time ticks are in hours (fractions of an hour are fine)
- Duration ticks are in data units, typically minutes or seconds
The same applies if you choose to give tickmarks exactly as an array, except that in the monthly case you give the positions in days to match the OLE date values.
