log scaling

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Herman
Newbie
Newbie
Posts: 56
Joined: Tue Dec 07, 2004 5:00 am

log scaling

Post by Herman » Thu Jan 13, 2005 10:52 am

Is there any log scaling for x and y axis?

Thank you

Herman

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Jan 13, 2005 11:27 am

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);
Marjan Slatinek,
http://www.steema.com

Herman
Newbie
Newbie
Posts: 56
Joined: Tue Dec 07, 2004 5:00 am

Post by Herman » Fri Jan 14, 2005 7:14 am

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

Herman
Newbie
Newbie
Posts: 56
Joined: Tue Dec 07, 2004 5:00 am

Post by Herman » Fri Jan 14, 2005 11:11 am

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?

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Fri Jan 14, 2005 11:18 am

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).
Marjan Slatinek,
http://www.steema.com

Post Reply