LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D graph : surface + scatter on same graph

Hello,

I am using the CWgraph3D to display 3D data points and a fit (surface). But it has some limitations : the data points are not displayed when the axes are in log scale with a minimal value of 1 and the display of the surface is buggy

Yddet_1-1576145877668.png

 

I discovered the "3D surface plot" which is nicer visually and the display of the surface is good in log scale. But I did not find a way to display the data points as a scatter plot in the same graph. Do you know if this is possible ?

Yddet_2-1576146159017.png  3D graphs.png

 

LV2018 32bits

Yddet

0 Kudos
Message 1 of 7
(3,782 Views)

Hello Yddet,

 

Thank you for your query.

There is a specialized function for a different kinds/variants of 3D plot. For instance, the one you are using is 3D surface plot. In order to display data on 3D scatter plot, you would be needing its own specialized function.

This list can be quite helpful for you.

 

Please let me know if this fulfills your need or you have any additional query.

 

Best Regards,

Muhammad Kamran Ayub
Staff Technical Support Engineer | Platforms & Systems

Certified LabVIEW Architect (CLA) | Certified TestStand Developer (CTD)

National Instruments UK & Ireland

0 Kudos
Message 2 of 7
(3,285 Views)

Hello muhammad,

 

Thank you for looking into my problem.

I looked again at the plot helpers but I can't figure out how to display a surface and the data points (scatter) on only one plot. I tried to connect the 3D plot array out from the 3D surface plot helper to the input of the 3D scatter plot helper but nothing is displayed. When I go to the 3D plot proprieties, open the scatter tab or surface tab and click on a plot I get an error. 

I noticed that the scatter and surface data points (not the surface itself) are displayed on the 3D scatter plot when rotating the plot. See image below

Yddet_0-1576663559270.png

 

Error from scatter plot proprieties : Error 1543 occurred at Invoke Node in 3D Plot.lvclass:Create Sprite Points.vi->3D Scatter.lvclass:Create Scatter.vi->3D Scatter.lvclass:Create Plot Object.vi->3D Plot.lvclass:Plot Object Event.vi->3D Plot.lvclass:Update Scene Object.vi->3D Plot.lvclass:Temp Scene Update.vi->3D Scatter.lvclass:Scatter Page.vi   Possible reason(s) :LabVIEW: (Hex 0x607) Cannot pass an empty position list for billboarding.

 

Error from surface plot proprieties : Error 1477 occurred at Invoke Node in 3D Surface.lvclass:Create Surface.vi->3D Surface.lvclass:Create Plot Object.vi->3D Plot.lvclass:Plot Object Event.vi->3D Plot.lvclass:Update Scene Object.vi->3D Plot.lvclass:Temp Scene Update.vi->3D Surface.lvclass:Surface Page.vi   Possible reason(s): LabVIEW: (Hex 0x5C5) An index in the mesh is greater than the number of elements in the element array.

 

scatter and surface.png

Yddet

 

0 Kudos
Message 3 of 7
(3,268 Views)

Hello Yddet,

 

In your below code, at the output, you will get a 3D graph 1D array with Index 0 as surface plot and Index 1 as scatter plot. Now, when you will try to plot both indices on either surface plot or scatter plot, there will be a conflict of classes (as scatter and surface use two different classes) and most likey graph will be blank.

 

If you use array index function and convert 1st and 2nd element back to 1D array and connect to correct class indicators, this should display. Though, I know that this should not solve your problem.

 

I can imagine what you are saying by "I noticed that the scatter and surface data points (not the surface itself) are displayed on the 3D scatter plot when rotating the plot". This is a non editable code most likely. I cannot access this code for 3D suface plot of the one shown in your last comment snippet, but if you select 3D Surface graph from front panel quick drop and right click>>Advanced>>Show Diagram, can give an idea. Though, this one is unrelated but can give a clue that there are propterties which changes the surface display to point display (Scatter sort of).

 

I couldn't spend enough time on this and have never came across this situation earlier, however, below thread can be a good point to look into. This method can give some flexibility and more control over properties. (You can use 3D Surface.vi with 3D graph object)

https://forums.ni.com/t5/LabVIEW/plot-multiple-3d/td-p/3268397

 

Just to remind, you can right click an indicator and select the properties/methods which can be edited. 

 

Muhammad Kamran Ayub
Staff Technical Support Engineer | Platforms & Systems
Certified LabVIEW Architect (CLA) | Certified TestStand Developer (CTD)
National Instruments UK & Ireland

0 Kudos
Message 4 of 7
(3,235 Views)

Hello Yddet,

 

Do we have any further queries on following?

 

Muhammad Kamran Ayub
Staff Technical Support Engineer | Platforms & Systems
Certified LabVIEW Architect (CLA) | Certified TestStand Developer (CTD)
National Instruments UK & Ireland

0 Kudos
Message 5 of 7
(3,180 Views)

Thank you Muhammad for your suggestions and I appreciate your follow up.

I just came back from holidays and I only had little time to look at your answer yet. Unfortunately if I don't find a new hope with your answer I may continue to use CWgraph3D with its limitations.

 

Yddet

0 Kudos
Message 6 of 7
(3,171 Views)

Hey Yddet,

 

I agree with you. There seems no simple way to merge these two plots or change the attributes. Thanks for the response.

 

Muhammad Kamran Ayub
Staff Technical Support Engineer | Platforms & Systems
Certified LabVIEW Architect (CLA) | Certified TestStand Developer (CTD)
National Instruments UK & Ireland

0 Kudos
Message 7 of 7
(3,164 Views)