Hi,
I am having some issues configuring a bottom axis in logarithmic mode.
I have a dataset of points (x,y). The x values are time in minutes, from 5 seconds to 60minutes.
The time points are:
between 5" and 1' : per 5 seconds
between 1' and 10' : per 1 minute
between 10' and 60' : per 5 minutes
So, there are more points with shorter times than longer times.
I have attached two screenshots
1st is the graph in non-logarithmic mode where the x-axis is divided into 10' increments
2nd is logarithmic mode, also divided in 10' increments
I set the bottom axis min/max values myself = 5/60 .. 60, or from 5" to 60'
The problem I have is that changing the LogarithmicBase property does not change anything how the bottom axis is scaled. Set it to 2 or 100, no difference.
I would like to scale it so the first 10 minutes is less spread out.
logarithmic bottom axis
Re: logarithmic bottom axis
Hello,
I've made a simple example project trying to reproduce the situation described. Could you please check it?
I've made a simple example project trying to reproduce the situation described. Could you please check it?
When Logarithmic is active, I see the labels changing when modifying the Increment/LogarithmicBase but the series points don't change, is that what you mean?strobbekoen wrote:The problem I have is that changing the LogarithmicBase property does not change anything how the bottom axis is scaled. Set it to 2 or 100, no difference.
I would like to scale it so the first 10 minutes is less spread out.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 23
- Joined: Tue Feb 10, 2009 12:00 am
Re: logarithmic bottom axis
Yes, I want to be able to scale the axis and the points.
Re: logarithmic bottom axis
Hello,
I understand you'd like the axis scale (and the series drawn) to follow a log scale with customizable base, but I'm not sure if this is mathematically coherent or possible.
I can't find examples of this kind of charts, can you?
I understand you'd like the axis scale (and the series drawn) to follow a log scale with customizable base, but I'm not sure if this is mathematically coherent or possible.
I can't find examples of this kind of charts, can you?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: logarithmic bottom axis
Hello again,
After discussing with my colleagues and after some research, I believe TeeChart is doing it well.
Take a look at this article where Jon Peltier explains how the log scale works in Excel and what to expect when changing the base (you can jump directly to the Excel 2007 part).
The data:
1, 1.5
2, 2.75
3, 5
4, 9
5, 17
6, 32
7, 60
The post entry starts with this:
The article continues with this:
The article ends with this:
After discussing with my colleagues and after some research, I believe TeeChart is doing it well.
Take a look at this article where Jon Peltier explains how the log scale works in Excel and what to expect when changing the base (you can jump directly to the Excel 2007 part).
The data:
1, 1.5
2, 2.75
3, 5
4, 9
5, 17
6, 32
7, 60
The post entry starts with this:
And here it is what I get if I load the data above in a TLineSeries with the default axes (I just change the min and max and some minor setting for aesthetics):Here’s the data in a default XY chart.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
Pointer.Visible:=true;
Pointer.Pen.Visible:=false;
Pointer.Style:=psDiamond;
AddXY(1, 1.5);
AddXY(2, 2.75);
AddXY(3, 5);
AddXY(4, 9);
AddXY(5, 17);
AddXY(6, 32);
AddXY(7, 60);
end;
Chart1.Axes.Bottom.Grid.Visible:=false;
Chart1.Axes.Bottom.SetMinMax(0, 8);
Chart1.Axes.Left.Grid.Visible:=false;
Chart1.Axes.Left.SetMinMax(0, 70);
end;
And this is what I get if I set the left axis to be logarithmicHere’s the data with the default base-10 log axis scale.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
Pointer.Visible:=true;
Pointer.Pen.Visible:=false;
Pointer.Style:=psDiamond;
AddXY(1, 1.5);
AddXY(2, 2.75);
AddXY(3, 5);
AddXY(4, 9);
AddXY(5, 17);
AddXY(6, 32);
AddXY(7, 60);
end;
Chart1.Axes.Bottom.Grid.Visible:=false;
Chart1.Axes.Bottom.SetMinMax(0, 8);
Chart1.Axes.Left.Grid.Visible:=false;
Chart1.Axes.Left.Logarithmic:=true;
Chart1.Axes.Left.SetMinMax(0, 100);
end;
And this is what I get if I change to log base 2:Here is the chart with a base 2 log axis scale.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
with Chart1.AddSeries(TLineSeries) as TLineSeries do
begin
Pointer.Visible:=true;
AddXY(1, 1.5);
AddXY(2, 2.75);
AddXY(3, 5);
AddXY(4, 9);
AddXY(5, 17);
AddXY(6, 32);
AddXY(7, 60);
end;
Chart1.Axes.Bottom.Grid.Visible:=false;
Chart1.Axes.Bottom.SetMinMax(0, 8);
Chart1.Axes.Left.Grid.Visible:=false;
Chart1.Axes.Left.Logarithmic:=true;
Chart1.Axes.Left.LogarithmicBase:=2;
Chart1.Axes.Left.SetMinMax(1, 64);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |