SharpPlot Reference > SharpPlot Methods > SetLabelMask Method

SharpPlot.SetLabelMask Method

This call allows you to selectively eliminate the x-axis labels. SharpPlot tries to do this for you automatically (if the labels collide) but it may not do it quite to your liking. Also it never eliminates labels if you use the angled setting on the X-axis, or for Dial or Polar charts.

Example

sp.SetLabelMask(new bool[] {true,false});  // Alternate labels

The example shows a DialChart with alternate labels omitted to avoid crowding.

The array of flags (you may use integers to save typing) is converted to boolean values and replicated to match the number of labels. It correctly takes account of Barcharts (which have a dummy label added at the Y-axis).

See also ...

SharpPlot Members


Send comments on this topic
© Dyalog Ltd 2021