Page 1 of 1

log scaling

Posted: Thu Jan 13, 2005 10:52 am
by 9235196
Is there any log scaling for x and y axis?

Thank you

Herman

Posted: Thu Jan 13, 2005 11:27 am
by Marjan
Hi, Hermann.

Yes, sure. Just set the TChartAxis.Logarithmic property to true.

Code: Select all

Chart1.Axes.Left.Logarithmic := True;
Chart1.Axes.Left.SetMinMax(1.e-3,1.0e+3);

Posted: Fri Jan 14, 2005 7:14 am
by 9235196
I found that in chart editor there is an axis scale property.
On the right of the logarithmic checkbox, there is a log base edit.

I want to make something like that, how?

Suppose i want to set the left axis:

when logarithmic is checked, then

chart1->LeftAxis->Logarithmic = true;
chart1->LeftAxis->LogarithmicBase = 100;

Then error comes, when i run it and checked the logarithmic checkbox.

How to solve it?

I use BCB6.

Thank you

Herman

Posted: Fri Jan 14, 2005 11:11 am
by 9235196
I got Logarithmic Axis Min and Axis Max error when I applying Logarithmic
on the chart. YAxis is from -3 to 3. X Axis is from 0 to 2000.
How to solve it?

Posted: Fri Jan 14, 2005 11:18 am
by Marjan
Hi, Herman.

Hmm... Negative values can be problematic, as any log function is defined only for positive values :wink:
Before switching to logarithmic scale, make sure axis values are positive. In short : you can't plot Log(-3)., only Log(x>0).