SharpPlot Tutorials > Style Examples > Exact fit of Axis Range Exact fit of Axis Range
By default SharpPlot rounds the scale to a major tickmark interval in both directions. If these ticks are well spaced out (for example annual data with 11 minor ticks at the month boundaries) it is often better just to span the range of the data.
sp.SetXTickMarks(20,3);
sp.Heading = "X-Axis Fits the Data Range Exactly";
sp.XAxisStyle = XAxisStyles.ForceZero|XAxisStyles.ExactFit;
sp.DrawLineGraph(col_S1,col_S2);
This style is often coupled with ForceZero to make the lower value round back nicely.
See also ...SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property
Send comments on this topic © Dyalog Ltd 2021
|