TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
PoLabs
- Newbie

- Posts: 28
- Joined: Wed Jun 06, 2007 12:00 am
Post
by PoLabs » Tue Sep 22, 2009 1:26 pm
Hi,
I would like to draw type of chart like BODE plot is.
See it here:
I have problems with bottom axis. I set Log property to true but how can I achieve that lines would be like on attached pictures? I tried with Increment property but without success.
I would like to mark the same as on attached picture: 10^-1 1 10 10^2 etc... how can be done this?
Could you please help me.
Thank you very much.
Best regards,
Aljosa
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Tue Sep 22, 2009 2:46 pm
Hi Aljosa,
Try doing like following:
Code: Select all
with Chart1.Axes.Bottom do
begin
Logarithmic := true;
SetMinMax(1, 1000);
MinorTickCount := 8;
MinorGrid.Visible := true;
MinorGrid.Style := psDot;
MinorGrid.Color := clGray;
Grid.Style := psDot;
AxisValuesFormat := '00e-0';
LabelsExponent := true;
end;
-
PoLabs
- Newbie

- Posts: 28
- Joined: Wed Jun 06, 2007 12:00 am
Post
by PoLabs » Wed Sep 30, 2009 8:10 am
Hi,
i still have some problems. Your suggestion doesn't work for me.

I attached picture of chart where I used your code.
The green lines represent MinorGrid.
I used your code
Code: Select all
with Chart.Axes.Bottom do
begin
SetMinMax(0, 1000);
Increment := 10; // this is mine... i tried different values without succes
Logarithmic := true;
MinorTickCount := 8;
MinorGrid.Visible := true;
MinorGrid.Style := psDot;
MinorGrid.Color := clGreen;
Grid.Style := psDot;
AxisValuesFormat := '00e-0';
LabelsExponent := true;
end;
Initialization part for my graph is:
Code: Select all
with Chart do
begin
BottomAxis.Maximum := 1e6;
BottomAxis.Minimum := 0;
BottomAxis.PositionPercent := 0.0;
BottomAxis.Increment := 100;
BottomAxis.Labels := true;
BottomAxis.LabelsOnAxis := true;
BottomAxis.LabelsFont.Color := clWhite;
BottomAxis.LabelsSize := 10;
BottomAxis.Title.Caption := 'Frequency (Hz)';
BottomAxis.Title.Font.Color := clWhite;
BottomAxis.Title.Font.Style := [fsBold];
LeftAxis.Maximum := 20;
LeftAxis.Minimum := 0;
LeftAxis.PositionPercent := 0.0;
LeftAxis.Increment := 2;
LeftAxis.Labels := true;
LeftAxis.LabelsOnAxis := true;
LeftAxis.LabelsFont.Color := clWhite;
LeftAxis.LabelsSize := 10;
LeftAxis.Title.Caption := 'Amplitude (V)';
LeftAxis.Title.Angle := 90;
LeftAxis.Title.Font.Color := clWhite;
LeftAxis.Title.Font.Style := [fsBold];
end;
What am I doing wrong? Thanks for your help!
Best regards
Aljosa
-
PoLabs
- Newbie

- Posts: 28
- Joined: Wed Jun 06, 2007 12:00 am
Post
by PoLabs » Wed Sep 30, 2009 1:40 pm
I found out solution. Increment must be 0 and then is ok.
Best regards
Aljosa
-
Yeray
- Site Admin

- Posts: 9645
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Oct 01, 2009 8:30 am
Hi Aljosa,
PoLabs wrote:I found out solution. Increment must be 0 and then is ok.
I'm happy to hear that!