Page 1 of 1

Problem with displaying values from 1E-7 to 1?

Posted: Fri May 18, 2007 9:34 am
by 9245066
Hi there,

I have this Codesegment which is making my head spin:

Code: Select all

  for l_i := 0 to l_grid.GetRowCount - 1 do
  begin
    for l_j := 0 to l_grid.GetColumnCount - 1 do
    begin
      l_gridPoint := l_grid.GetGridPoint(l_i,l_j);
      if l_gridPoint <> Nil then
      begin
        c_dataSurfSerie.AddXYZ(l_gridPoint.GetPosition.Left,l_gridPoint.LocalPotential, l_gridPoint.GetPosition.Top)
      end
      else
        c_dataSurfSerie.AddXYZ(l_i,0,l_j);
    end;
  end;
  Axes.Depth.Visible := true;
  Axes.Depth.Logarithmic := true;
  Axes.Depth.Automatic := true;
  Axes.Bottom.Automatic := true;
  Axes.Bottom.Logarithmic := true;
http://img521.imageshack.us/img521/6902/wertehu2.png
Here are the values (cut off at the bottom).
x = getposition.left
z = getposition.top
y = localpotential


The Problem is, the surface is not displayed... The Axes are scaled the right way (although the format is not right yet).

I tried this code with exchanging:
getposition.left <-> l_i
getposition.top <-> l_j

There I had a result, so its no problem with the localPotential

thanks in advance,
HMI

Posted: Fri May 18, 2007 10:30 am
by narcis
Hi HMI,
I tried this code with exchanging:
getposition.left <-> l_i
getposition.top <-> l_j

There I had a result, so its no problem with the localPotential
I'd say the problem is with X and Z coordinates. Have you tried using the line below? Does the quote above mean you got the chart you expected using this?

Code: Select all

        c_dataSurfSerie.AddXYZ(l_i,l_gridPoint.LocalPotential, l_j) 
Thanks in advance.

Posted: Fri May 18, 2007 11:00 am
by 9245066
Yes, this line I tried. It works, for displaying issue. But l_i and l_j are not
the values I want to display.

Ok, more details:
I have a grid of Points with l_i rows and l_j columns.
Every gridpoint has a distance from the Top and the Left (in cm)
and its localPotential.


first I thought there would be double values for one gridpoint like

x=1, y=1, z=5
x=1, y=1, z=4

so that TChart has some problems with this, but there is nothing double.

Posted: Fri May 18, 2007 11:03 am
by narcis
Hi HMI,

Ok, then it's most likely that you are nout using surface series properly. You may need to use IrregularGrid=true. Please read this thread where I explained how to use that kind of series.

Thanks in advance.

Posted: Fri May 18, 2007 11:17 am
by 9245066
Ahhh... Yes that's what was missing:D Thank you.
I did not find nothing about this issue in the Help-files.
Maybe you could add it to the TSurfaceSeries Helppage
or somewhere more generell.

Or am I to blind to find it?

Kind regards,
HMI

p.s.: no answer needed, just a rethoric question;)