Hello again,
I changed now from Lazarus 64 Bit to 32 Bit version and there it works
as expected.
BR Peter
Am 13.12.2013 22:18, schrieb Peter Thurner:
Hello *,
here is an example which I use to try log transform for x-axis:
Can anybody try out please the code below which plots a sin(x)/x curve
between 1 ... 100 in linear scale.
(please see attached picture).
If I apply a log10 transform to the x axis, then I always get a "Range
Check Error"!
What do I do wrong here?
Thanks in advance for your help.
=======================================================
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, TAGraph, TATransformations, TASeries,
TAFuncSeries, TAIntervalSources, Forms, Controls, Graphics, Dialogs;
type
{ TForm1 }
TForm1 = class(TForm)
Chart1: TChart;
ChartAxisTransformations1: TChartAxisTransformations;
LogarithmAxis: TLogarithmAxisTransform;
SincSeries: TLineSeries;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
const
N = 1000;
MIN = 0.1;
MAX = 100;
var
i: integer;
x: double;
begin
for i := 0 to N - 1 do
begin
x := MIN + (MAX - MIN) * i / (N - 1);
SincSeries.AddXY(x, sin(x)/x);
end;
end;
end.
=======================================================
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus