Bug in log axis........???
Posted: Thu Feb 05, 2004 3:47 pm
Hi,
I am using the following code in a VB6 application to generate a graph
with a logarithmic x-axis. The x-axis in this example goes from 10^3 to
10^4. The problem I am having is that the minor grid lines that are
generated by this code are not being positioned correctly. In my example,
minor grid lines are drawn at 2000, 4000, 6000 and 8000. In the case of
the 2000 line (for example), it should appear at a point on the graph that
is 30% of the total graph (log(1000) = 3.0, log(2000) = 3.3 and log(10000)
= 4, thus 2000 occurs 0.3 or 30% along the x-axis), but it really appears
at a point about 45% of the total graph. The problem does not change when I try a different number of minor ticks. A sample graph can be seen at http://www.analysistech.com/images/tchart.jpg to see what I mean! Am I doing something wrong, or is there a bug in the TeeChart code??
BTW, I'm using Teechart5.ocx version 5.0.3.1.
Thanks,
John
Example Code
'here is the Steema code (not working) to do this.....
.Axis.Bottom.Logarithmic = True
.Axis.Bottom.MinorGrid.Visible = True
.Axis.Bottom.SetMinMax 10 ^ xLoLog, 10 ^ xHiLog
.Axis.Bottom.MinorTicks.Visible = True
.Axis.Bottom.MinorTickCount = 4
.Axis.Bottom.Labels.ValueFormat = "0E-0"
.Axis.Bottom.Increment = 0
I am using the following code in a VB6 application to generate a graph
with a logarithmic x-axis. The x-axis in this example goes from 10^3 to
10^4. The problem I am having is that the minor grid lines that are
generated by this code are not being positioned correctly. In my example,
minor grid lines are drawn at 2000, 4000, 6000 and 8000. In the case of
the 2000 line (for example), it should appear at a point on the graph that
is 30% of the total graph (log(1000) = 3.0, log(2000) = 3.3 and log(10000)
= 4, thus 2000 occurs 0.3 or 30% along the x-axis), but it really appears
at a point about 45% of the total graph. The problem does not change when I try a different number of minor ticks. A sample graph can be seen at http://www.analysistech.com/images/tchart.jpg to see what I mean! Am I doing something wrong, or is there a bug in the TeeChart code??
BTW, I'm using Teechart5.ocx version 5.0.3.1.
Thanks,
John
Example Code
'here is the Steema code (not working) to do this.....
.Axis.Bottom.Logarithmic = True
.Axis.Bottom.MinorGrid.Visible = True
.Axis.Bottom.SetMinMax 10 ^ xLoLog, 10 ^ xHiLog
.Axis.Bottom.MinorTicks.Visible = True
.Axis.Bottom.MinorTickCount = 4
.Axis.Bottom.Labels.ValueFormat = "0E-0"
.Axis.Bottom.Increment = 0