TContourSeries problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Alexander
Newbie
Newbie
Posts: 4
Joined: Fri Sep 24, 2004 4:00 am
Location: St.Petersburg

TContourSeries problem

Post by Alexander » Tue Nov 01, 2005 12:30 pm

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;
:?:

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 03, 2005 3:16 pm

Hi Alexander,

To have it working properly you should set Series1.IrregularGrid:=true; before populating your series.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Alexander
Newbie
Newbie
Posts: 4
Joined: Fri Sep 24, 2004 4:00 am
Location: St.Petersburg

Labels on levels in contour plot?

Post by Alexander » Thu Nov 03, 2005 4:07 pm

Thank you very much! But I have another question. How is it possible to put labels on levels in a contour plot?
Alexander :?:

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 07, 2005 7:52 am

Hi Alexander,

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

Alexander
Newbie
Newbie
Posts: 4
Joined: Fri Sep 24, 2004 4:00 am
Location: St.Petersburg

Post by Alexander » Mon Nov 07, 2005 2:19 pm

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

Post Reply