Show axis values in exponential form

Sep 10, 2009 at 7:52 AM
Edited Sep 10, 2009 at 10:00 AM

I have an array of y-coords ranging from 10^2 to 10^7.

Is it possible to switch displaying of у-axis from normal to exponential?

Thank you.

Sep 11, 2009 at 7:41 AM


To archive what you want, use the following code:


HorizontalAxis axis = (HorizontalAxis)plotter.MainHorizontalAxis;
axis.LabelProvider.SetCustomFormatter(info => info.Tick.ToString("#.######E+0"));

Hope this helps.

If you don't need the view produced by default label provider, use a ToStringLabelProvider:


NumericAxis axis = (NumericAxis)plotter.MainHorizontalAxis;
axis.LabelProvider = new ToStringLabelProvider();

Best regards,