09-25-2025 05:49 AM
Hi folks,
I need to control the individual color of points in a 3D scatter plot. The post
ActiveX 3D Graph Shows Wrong Colors of Points on LabVIEW - NI
seems to give the direction. However, I fail to fill the 3D indicator with n 1-point plots rather than one plot with n points. See the attached vi. What am I doing wrongly?
Best regards,
Peter
09-29-2025 04:50 PM - edited 09-29-2025 04:50 PM
Hi Peter,
Your example differs from the example from the article.
On the for loop output tunnle, rightclick -> tunnlemode -> concatenating
This will create an array of plot-objects, rather than a single one.
These will now all have the same color. By using the propertynode for "active plot", followed by the propertynodes for the style and color palette, you can set the color palette to a single specific color for each plot. You have to make sure to set the plot ID for the plot helper and the property node.
I've attached an example that colors the dots with 10 different colors defined in a separate array.
Best, Jan
09-30-2025 09:23 AM - edited 09-30-2025 10:23 AM
I'd say you better use a shift register instead of auto-concatenating
why?
your sample data has N= 10, so there shall be 10 plots.
if you use auto-concatenating this results in sizes = 55
if you use a shift register instead of auto-concatenating this results in sizes = 10, as expected, therefore I prefer the shift register method
however, for both methods, the resulting plots look almost identical, and for a dataset with N=10 this is irrelevant.
attached as labview 2025 q3, as I can't back-convert, because of:
10-01-2025 07:50 AM
Hi Alexander,
thanks a lot for your comment. You are in deed right. The Plot helper generates an array of the size of the Plot-ID you enter. That way a faculty(i) (i!) sized array is created with a lot of empty plots.
This causes the performance issues that were also mentioned in the article.
I've created a new article and example for this that runs much faster and replaced the old KnowledgeBase with it:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA0VU0000009mjl0AA&l=en-GB
Best,
Jan
10-09-2025 10:44 AM
Thanks a lot to both, Jan and Alexander, for the given solution!
10-09-2025 10:47 AM
Jan, hate to be "that guy" but since you JUST posted it, thought I'd point out a typo- the first line says "The points in a single plor are..."
Think that should be "plot" 🙂