TContourseries, TColorGridseries and TBitmap in TColorgrid
Posted: Fri Nov 10, 2006 10:47 pm
I have 3D data of temperature - ie. temperature as a function of spatial position T(x,y,z) and
would like to have these data plotted.
First I use TContouseries and I would like to have these data plotted as "contineous" data. I have used the
following algorithm with series1 as TContouseries:
Chart1.Chart3Dpercent := 40;
chart1.DepthAxis.Visible := true;
Series1.YPosition := 6;
series1.IrregularGrid := true;
for i := 0 to 100 do
for j := 0 to 200 do
series1.AddXYZ(i/100, j/20,j/100);
series1.Pen.Visible := true;
series1.Pen.Width := 20;
1) I would like the contour plot to be flat but if I reduced the pen.width then
the contineous contours disappear. If I increase the pen.width the plot becomes "thick" and not very
appealing. How can I overcome this difficulty? That is - I want the contour image to be a contenious
plane in a 3D x-y-z chart without this very thick pen.
I would then like to use the TColorgrid plot in order to overcome the problems with
TContourseries.
Using the "editing chart1" dialog box, and using "Series-->>format-->>position-->>plan Y" I can change the
colorgrid so that it is in the xz-plane instead of in the xy-plane.
3) How do I change from the xy-plane to the xz-plane using code during runtime instead of using the
editing chart1 tool dialog box? I mean what is the name of the function that performs this?
4) How do I set the "height" of the location of TColorgrid - Ie. the Y value at which the colorgrid
is located? (for TContourseries I can use "YPosition" but this does not work for TColorgrid)
If I use the algorithm below then the TColorgrid changes from the xz plane to the xy plane automatically
at runtime.
5) I think this is because I use irregulargrid := true. How do I overcome this difficulty? I HAVE to use
irregulargrid := true due to limitations in the my data. How do I maintain the colorgrid in the xz-plane
when using irregulargrid := true
Chart1.Chart3Dpercent := 40;
chart1.DepthAxis.Visible := true;
series1.IrregularGrid := true;
for i := 0 to 100 do
for j := 0 to 200 do
series1.AddXYZ(i/20, j*i/200,j/20);
series1.Pen.Visible := false;
Because of all these problems with Contourseries and Colorgrid, I can make my own contourimage and then
import these contourimages into a teechart using the algorithm below where series1 is a TColorgrid:
var
rect:Trect;
bmp :Tbitmap;
begin
bmp := Tbitmap.Create;
bmp.LoadFromFile('someBMPfile.BMP');
rect.Top := 200;
rect.bottom := 0;
rect.left := 0;
rect.right := 200;
chart1.Canvas.StretchDraw(rect,bmp,10);
chart1.Repaint;
series1.Bitmap := bmp;
However this does not plot the image very good -
6) what is wrong with the algorithm just above here?
would like to have these data plotted.
First I use TContouseries and I would like to have these data plotted as "contineous" data. I have used the
following algorithm with series1 as TContouseries:
Chart1.Chart3Dpercent := 40;
chart1.DepthAxis.Visible := true;
Series1.YPosition := 6;
series1.IrregularGrid := true;
for i := 0 to 100 do
for j := 0 to 200 do
series1.AddXYZ(i/100, j/20,j/100);
series1.Pen.Visible := true;
series1.Pen.Width := 20;
1) I would like the contour plot to be flat but if I reduced the pen.width then
the contineous contours disappear. If I increase the pen.width the plot becomes "thick" and not very
appealing. How can I overcome this difficulty? That is - I want the contour image to be a contenious
plane in a 3D x-y-z chart without this very thick pen.
I would then like to use the TColorgrid plot in order to overcome the problems with
TContourseries.
Using the "editing chart1" dialog box, and using "Series-->>format-->>position-->>plan Y" I can change the
colorgrid so that it is in the xz-plane instead of in the xy-plane.
3) How do I change from the xy-plane to the xz-plane using code during runtime instead of using the
editing chart1 tool dialog box? I mean what is the name of the function that performs this?
4) How do I set the "height" of the location of TColorgrid - Ie. the Y value at which the colorgrid
is located? (for TContourseries I can use "YPosition" but this does not work for TColorgrid)
If I use the algorithm below then the TColorgrid changes from the xz plane to the xy plane automatically
at runtime.
5) I think this is because I use irregulargrid := true. How do I overcome this difficulty? I HAVE to use
irregulargrid := true due to limitations in the my data. How do I maintain the colorgrid in the xz-plane
when using irregulargrid := true
Chart1.Chart3Dpercent := 40;
chart1.DepthAxis.Visible := true;
series1.IrregularGrid := true;
for i := 0 to 100 do
for j := 0 to 200 do
series1.AddXYZ(i/20, j*i/200,j/20);
series1.Pen.Visible := false;
Because of all these problems with Contourseries and Colorgrid, I can make my own contourimage and then
import these contourimages into a teechart using the algorithm below where series1 is a TColorgrid:
var
rect:Trect;
bmp :Tbitmap;
begin
bmp := Tbitmap.Create;
bmp.LoadFromFile('someBMPfile.BMP');
rect.Top := 200;
rect.bottom := 0;
rect.left := 0;
rect.right := 200;
chart1.Canvas.StretchDraw(rect,bmp,10);
chart1.Repaint;
series1.Bitmap := bmp;
However this does not plot the image very good -
6) what is wrong with the algorithm just above here?