Is it possible to set your own interval on a logarithmic scale?
This discussion was imported from CodePlex
willmoore88 wrote at 2013-07-12 16:35:
I'm trying to create a more natural logarithmic scale, much like the x axis on this graph..
http://openeeg.sourceforge.net/doc/modeeg/images/filter_delay_log.png
By setting the base to 2.718281828 I get this, but the intervals between the major ticks aren't right and the values that have been chosen are pretty random and I need them rounding to more meaningful values.
This is the output at the minute.
https://www.dropbox.com/s/5dr70tk34vz1wp2/logscale.jpg
This is now a real sticking point in using this library in my application which would be a real shame as I've got some brilliant results so far.
If anyone can help me out then I can share some code then.
http://openeeg.sourceforge.net/doc/modeeg/images/filter_delay_log.png
By setting the base to 2.718281828 I get this, but the intervals between the major ticks aren't right and the values that have been chosen are pretty random and I need them rounding to more meaningful values.
This is the output at the minute.
https://www.dropbox.com/s/5dr70tk34vz1wp2/logscale.jpg
This is now a real sticking point in using this library in my application which would be a real shame as I've got some brilliant results so far.
If anyone can help me out then I can share some code then.
willmoore88 wrote at 2013-07-12 16:51:
I think I need to be setting the major step but i'm not sure...
So this is exactly what I want...
https://www.dropbox.com/s/njef6lzuts2qrof/log2.png
But this is plotting from 0.1 to 1.
I need to plot from 0(ish) to 32,800.
So this is exactly what I want...
https://www.dropbox.com/s/njef6lzuts2qrof/log2.png
But this is plotting from 0.1 to 1.
I need to plot from 0(ish) to 32,800.
everytimer wrote at 2013-07-12 21:13:
I don't understand completely your question, but at first glance: won't it be enough for you to set the Maximum/Minimum of the axis?
Log2
Log8
Log10
I think you can't retrieve the label for minor ticks right now, correct if I'm wrong.
By the way: why would you set the base to "e"? Its logical to obtain "random" values (e^2, e^3...)
LogarithmicAxis axis1 = new LogarithmicAxis();
axis1.Position = AxisPosition.Bottom;
axis1.Base = 8;
axis1.MinorStep = 2;
axis1.MinorGridlineStyle = LineStyle.Dot;
axis1.MinorGridlineColor = OxyColors.LightGray.ChangeAlpha(20);
axis1.Minimum = 0;
axis1.Maximum = 32800;
plotter.Model.Axes[0] = axis1;
plotter.RefreshPlot(true);
Results:Log2
Log8
Log10
I think you can't retrieve the label for minor ticks right now, correct if I'm wrong.
By the way: why would you set the base to "e"? Its logical to obtain "random" values (e^2, e^3...)
Customer support service by UserEcho