Page 1 of 1

TContourSeries problem

Posted: Tue Nov 01, 2005 12:30 pm
by 9234285
When plotting with CONTOUR series the lines on the map are displayed not from the beginning of the axis. It happened when values are around 1 and have few decimal places. Code example below. How is it possible to fix the problem?
Alexander


procedure TForm1.btnStartClick(Sender: TObject);
var
k1,k2,step:integer;
x,y,z:real;
begin
step:=20;
series1.Clear;
series1.NumXValues:=step;
series1.NumZValues:=step;
memo1.Lines.Add('k1..k2...x...y...z');
for k1:=1 to step do begin
x:=k1/10;
for k2:=1 to step do begin
y:=k2;
z:=k1/10+k2/10;
series1.AddXYZ(x,z,y);
series2.AddXY(x,y,'',clRed);
series1.AutomaticLevels:=true;
end;
end;

end;
:?:

Posted: Thu Nov 03, 2005 3:16 pm
by narcis
Hi Alexander,

To have it working properly you should set Series1.IrregularGrid:=true; before populating your series.

Labels on levels in contour plot?

Posted: Thu Nov 03, 2005 4:07 pm
by 9234285
Thank you very much! But I have another question. How is it possible to put labels on levels in a contour plot?
Alexander :?:

Posted: Mon Nov 07, 2005 7:52 am
by Pep
Hi Alexander,

do you mean in the Legend ? If so you could use the OnGetLegendText to add extra text in the Legend items.

Posted: Mon Nov 07, 2005 2:19 pm
by 9234285
Hi Josep Lluis,

No, I mean in the map to sign distinct isolines. In my case I use several series simultaneously, and I am not sure that it is possible to use several legends.

Alexander