When I draw Vector 3D with TSurfaceSeries(DEIPHI 7.0, TCHART7.07), the Z axis scale should be input with the SAME num, or the picture can’t be drawled.
For example:
When I input the follow code :
series1.addxyz(0,0.5,0);
series1.addxyz(10,0.5,0);
series1.addxyz(25,0.5,0);
series1.addxyz(0,0.6,1.1);
series1.addxyz(10,0.6,1.5);
series1.addxyz(25,0.6,1.3);
series1.addxyz(0,0.75,2);
series1.addxyz(10,0.75,2);
series1.addxyz(25,0.75,2);
the 3D cann’t be drawled. How to cure this problem? Thank you!
HOW TO CHANGE THE Z AXIS SCALE OF TSurfaceSeries!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi hexfhhu,
TSurfaceSeries needs to be populated having a grid structure where columns are determined by X values and rows are defined by Z values. Each cell value is defined by Y values. Considering this you should be able to populate a surface series using a for nested loop, for example:
Also there are some variants to this allowed by IrregularGrid property:
You need to set IrregularGrid property to true (by default set to false) in the following cases:
1. When X and Z intervals are not equidistant.
2. When X or Z intervals are different from 1.
3. When X or Z intervals have negative values.
Considering this your series may be populated like this:
Note that I inverted Y and Z values and set IrregularGrid to true.
TSurfaceSeries needs to be populated having a grid structure where columns are determined by X values and rows are defined by Z values. Each cell value is defined by Y values. Considering this you should be able to populate a surface series using a for nested loop, for example:
Code: Select all
for x:=0 to 10 do
for z:=0 to 5 do
Series1.AddXYZ(x,random,z);
Code: Select all
Series1.IrregularGrid := true;
1. When X and Z intervals are not equidistant.
2. When X or Z intervals are different from 1.
3. When X or Z intervals have negative values.
Considering this your series may be populated like this:
Code: Select all
series1.addxyz(0,0,0.5);
series1.addxyz(10,0,0.5);
series1.addxyz(25,0,0.5);
series1.addxyz(0,1.1,0.6);
series1.addxyz(10,1.5,0.6);
series1.addxyz(25,1.3,0.6);
series1.addxyz(0,2,0.75);
series1.addxyz(10,2,0.75);
series1.addxyz(25,2,0.75);
Series1.IrregularGrid:=true;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |