Page 1 of 1
Log scale on axis
Posted: Tue Sep 22, 2009 1:26 pm
by 9245460
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
Re: Log scale on axis
Posted: Tue Sep 22, 2009 2:46 pm
by yeray
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;
Re: Log scale on axis
Posted: Wed Sep 30, 2009 8:10 am
by 9245460
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
Re: Log scale on axis
Posted: Wed Sep 30, 2009 1:40 pm
by 9245460
I found out solution. Increment must be 0 and then is ok.
Best regards
Aljosa
Re: Log scale on axis
Posted: Thu Oct 01, 2009 8:30 am
by yeray
Hi Aljosa,
PoLabs wrote:I found out solution. Increment must be 0 and then is ok.
I'm happy to hear that!