SharpPlot Tutorials > Style Examples > Angled Labels

Angled Labels

For simple XY plots you can have the X-axis labels drawn at an angle to the axis, with the angle set as you choose. The default is 34 degrees which looks reasonable for most charts and text.

For 3D charts either X labels or Y labels may be angled. In this case the labels are always drawn midlined along the projection of the corresponding tickmark or gridline.

sp.SetXLabels(new string[]{"Fat","Cat","Sat on mat"});
sp.SetYLabels(new string[]{"Here","we","go","Again"});
sp.XAxisStyle = XAxisStyles.AngledLabels;
sp.YAxisStyle = YAxisStyles.AngledLabels;

You cannot set the angle explicitly here – SharpPlot will choose the alignment for you depending on the perspective and viewpoint used.

See also ...

SharpPlot.Perspective Property | SharpPlot.XLabelAngle Property | SharpPlot.SetViewpoint Method

Send comments on this topic
© Dyalog Ltd 2016