Data will plot as 3d points but not as 3d surface
Data will plot as 3d points but not as 3d surface
In 3d surface the surface plot does not display but if I turn the markers on the marks do display just not the plot.
John Lott
John Lott
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John Lott,
Could you please send some code or an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Could you please send some code or an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
Thank you very much for the project.
Using your project with latest TeeChart for .NET v2 release, the series is populated and visible as you can see in the image I attached in the newsgroups.
Surface series and all series styles derived from Custom3D class need to have a grid structure. The grid's columns are determined by x values, rows by z values and each cell value is indicated by y values. If x and z values are not equidistant then you need to set IrregularGrid property to true. That's why not all points may be displayed in your surface series.
According to this, for your series to display all points, should be populated like this:
Thank you very much for the project.
Using your project with latest TeeChart for .NET v2 release, the series is populated and visible as you can see in the image I attached in the newsgroups.
Surface series and all series styles derived from Custom3D class need to have a grid structure. The grid's columns are determined by x values, rows by z values and each cell value is indicated by y values. If x and z values are not equidistant then you need to set IrregularGrid property to true. That's why not all points may be displayed in your surface series.
According to this, for your series to display all points, should be populated like this:
Code: Select all
Dim s As Steema.TeeChart.Styles.Surface
Dim x As Integer
Dim z As Integer
Dim Rand As New Random
s = TChart1.Series(0)
s.Clear()
For x = 0 To 150
For z = 1 To 12
s.Add(3937 * x, Rand.Next(), z)
Next z
Next x
s.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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
I didn't make any changes to the code. I just ran your project with TeeChart for .NET v2 latest maintenance release available at the customer download area.
I attached the picture in a message at the news://www.steema.net/steema.public.attachments newsgroup as a reply to the message with the attached project you sent. If necessary I can send the image to your forums contact e-mail address.
I didn't make any changes to the code. I just ran your project with TeeChart for .NET v2 latest maintenance release available at the customer download area.
I attached the picture in a message at the news://www.steema.net/steema.public.attachments newsgroup as a reply to the message with the attached project you sent. If necessary I can send the image to your forums contact e-mail address.
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 |
3d surface
Since my code works okay in teechart version 2.0 and I assume vsnet 2005, does that mean the problem lies in teechart version 1.1*** or vsnet 2003.
I did down load and install the latest 1.1 update.
What I am understanding is that my code is okay but it doesnot work in the environment I am using it.
John
I did down load and install the latest 1.1 update.
What I am understanding is that my code is okay but it doesnot work in the environment I am using it.
John
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
Your surface is not displayed at all using TeeChart for .NET v1. TeeChart for .NET v2 adds many enhancements and new features compared to TeeChart for .NET v1. However, with v2, your surface is still not fully drawn as it doesn't respect the grid structure I told you.
For example, the last row in your points.txt file is:
606.299,-10.744,12
606.299 is not a multiple of 3.937. Most of the x values are multiples of 3.937 but others not. This makes your data not to fit in this grid structure and thus those points won't be drawn.
Your surface is not displayed at all using TeeChart for .NET v1. TeeChart for .NET v2 adds many enhancements and new features compared to TeeChart for .NET v1. However, with v2, your surface is still not fully drawn as it doesn't respect the grid structure I told you.
For example, the last row in your points.txt file is:
606.299,-10.744,12
606.299 is not a multiple of 3.937. Most of the x values are multiples of 3.937 but others not. This makes your data not to fit in this grid structure and thus those points won't be drawn.
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 |
3d surface
What does the value 3.937 mean ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
If you look at your data file (this is just an excerpt):
If you look at your data file (this is just an excerpt):
Most X values are multiple of 3.937:0,-5.035004,1
19.685,-6.216003,1
23.622,-5.586006,1
27.559,-10.035,1
39.37,-9.523003,1
47.244,-17.51501,1
86.614,-33.736,1
94.488,-33.42101,1
98.425,-31.492,1
118.11,-40.58601,1
125.984,-44.051,1
129.921,-43.342,1
330.709,-45.62601,1
334.646,-51.728,1
342.52,-33.854,1
354.331,-18.145,1
366.142,-11.29501,1
370.079,-16.216,1
377.953,-5.744003,1
381.89,-7.555,1
429.134,0,1
440.945,-2.200005,1
460.63,0,1
0,-6.728004,2
3.937,-27.00401,2
7.874,-7.004005,2
11.811,-7.161003,2
19.685,-7.673004,2
23.622,-8.224007,2
35.433,-7.673004,2
47.244,-8.618004,2
51.181,-12.00401,2
55.118,-14.051,2
59.055,-10.11401,2
62.992,-16.80701,2
70.866,-22.673,2
78.74,-22.94901,2
82.677,-29.917,2
90.551,-26.846,2
98.425,-30.429,2
102.362,-31.413,2
106.299,-35.271,2
118.11,-38.539,2
157.48,-56.88601,2
342.52,-56.098,2
354.331,-31.964,2
358.268,-30.311,2
366.142,-25.62601,2
393.701,-5.035004,2
401.575,-6.295006,2
405.512,-6.137001,2
417.323,-0.1930008,2
496.063,0,2
574.803,-0.6650009,2
582.677,0,2
586.614,0,2
594.488,0,2
614.173,0,2
- 0 is obviously a multiple of 3.937
19.685 = 3.937 * 5
23.622 = 3.937 * 6
27.559 = 3.937 * 7
etc.
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 |
Claraification
The original values were in meters and were converted to inches.
In the example of 19.85 = 3.937 * 5
actually is .5 meters * 39.37 = 19.85 inches app.
My thinking now is that
a. my x's need to be integers or least something with a common divisor
b. my grid needs to 650 * 12 which would require a lot of points to draw a good plot.
c. As I only have about 500 points these are not sufficient to draw a good surface plot.
At any rate thanks for your help. I will see if I can come up with an alternative.
John
In the example of 19.85 = 3.937 * 5
actually is .5 meters * 39.37 = 19.85 inches app.
My thinking now is that
a. my x's need to be integers or least something with a common divisor
b. my grid needs to 650 * 12 which would require a lot of points to draw a good plot.
c. As I only have about 500 points these are not sufficient to draw a good surface plot.
At any rate thanks for your help. I will see if I can come up with an alternative.
John
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi John,
a. X values don't need to be integers, they can be doubles but they need to have a common divisor.
b. Well, this can make the surface being somewhat slow. This will depend on the power of the machine you are running the application at.
c. This depends on how your data is.
a. X values don't need to be integers, they can be doubles but they need to have a common divisor.
b. Well, this can make the surface being somewhat slow. This will depend on the power of the machine you are running the application at.
c. This depends on how your data is.
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 |