I have a log-log plot with both axes in the range 0.1 to 1000. I want only 1 major tick per decade. So far I have found no way to control the tick spacing, except to set IntervalLength as in this code.
var logxAxis = new LogarithmicAxis
{
Position = AxisPosition.Bottom,
Title = "Resistivity of Approaching Bed (ohm-m)",
IntervalLength = 100,
MajorGridlineStyle = LineStyle.Solid,
MinorGridlineStyle = LineStyle.None,
MinorTickSize = 0.0,
Key = "logx"
};
The default IntervalLength is 60, which gave me 2 ticks/decade. Unfortunately, as I increase the window size of my application the number of major ticks increase. So setting IntervalLength is not an ideal solution. I have looked through the OxyPlot source and found nothing. Is there something I am missing, or perhaps I need to derive my own LogarithmicAxis class?
Edit: I decided to derive my own logarithmic axis and replace the function the generated the ticks.
public override void GetTickValues(out IList<double> majorLabelValues, out IList<double> majorTickValues,
out IList<double> minorTickValues)
{
majorLabelValues = new List<double> { 0.1, 1, 10, 100, 1000 };
majorTickValues = new List<double> { 0.1, 1, 10, 100, 1000 };
minorTickValues = new List<double>();
}
This at least lets me get my application out the door.