SharpPlot Tutorials > Style Examples > Log-scaled Axis

Log-scaled Axis

The base-10 log of the data is plotted and tickmarks are adjusted appropriately.

sp.LineGraphStyle = LineGraphStyles.GridLines;
sp.Heading = "Y-Axis uses a Logarithmic Scale";
sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.LogScale;
sp.XAxisStyle = XAxisStyles.ForceZero;

If ForceZero is used on a logarithmic axis, the scale is actually forced to 1 as zero is meaningless here.

See also ...

SharpPlot.XAxisStyle Property | SharpPlot.YAxisStyle Property | SharpPlot.ZAxisStyle Property

Send comments on this topic
© Dyalog Ltd 2016