LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use a 3D scatter plot to map points in a 3D environement then color them to a data set, in essence creating a 4D plot?

Hey Fancy Folk,

 

Background: I mapped a magnet and am trying to plot the magnetic flux in a 3D plot.  I mounted the magnet on a lathe and clocked off and encoder which was triggered by the index pulse.  I sampled a full 360 degree revolution of data.  I then moved me sensor radially away from the center and sampled another 360 degree of data.  Once my max radius was achieved, I brought the sensor back to the center and moved the sensor away from the magnet along the height axis.  I now have a bunch of data at 360 degrees at various distances from center and heights, kind of like rings of a tree.

 

Goal: I am trying to plot the data in a meaningful way.  My thought is that I can use a 3D scatter plot to plot the 360 degree rings and heights then use the magnet flux measurement to color the data points.  The way I am thinking about this, I’d need 4 dimensions of data to go into my 3D plot (360 degrees, radial distance, height, and magnetic flux). 

 

What I’ve tried: I can create a 3D scatter plot which can plot the rings and heights that’s I want.  But I do not know how to apply the magnetic value to this data. It appears that the color for the graph is based off of the Y axis.

I currently have the 3D scatter plot in cylindrical mode, where X array is the radius of the circle from 0 to 2pi.  Y is the heights, and z are the diameter rings.

Matt_AM_0-1620235462149.png

 

What I’m looking for: Any suggestions to solve this issue.  I really haven’t been able to find any good documentation on how 3D plots are supposed to work.  I’m fine with using a different tool, I’m just not sure what tools are out there.  Most things appear to be for 2D plots in Labview.

Attention new LV users, NI has transitioned from being able to purchase LV out right to a subscription based model. Just a warning because LV now has a yearly subscription associated with it.
0 Kudos
Message 1 of 2
(835 Views)

Hey Fancy Folk,

 

Been bashing my face against my keyboard for a few hours and I finally got what I am looking for. 

 

Method that worked: I found out someone mentioned that you can use a 3D parametric graph.  This graph allows the user to enter an X, Y, Z, and W array.  X, Y, and Z being the coordinates (I ended up using Cartesian and converted my radius measurement to and X and Y value, then stacked the the height values) and W being the color map.  The image below is basically what I was looking for.  I ended up cutting out a "slice" of the circle so I could see the different height measurements easier.  Also applied some transparency so the darker colors (sections of intrest) of my color map would "pop" against the lighter colors ("background noise").

 

Quick note, to get the 3D parametric graph, I ended up going to the FP and searching for the control.  Once I selected it, the helper VI populated in the back panel.

Matt_AM_0-1620652739916.png

 

Method that didn't work for me:  before I came across the 3D parametric, I tried using CW3D graphs.  I came across a few posts that showed how you can use the CW graphs to get everything you want (shout out to Ben).  I couldn't figure out how to get the points to follow my color map.  However, in surface mode, the surfaces would followed the color map.  Issue in surface mode was that I couldn't get distinct "height slices" so my data would go out to max radius, then a surface would go from there to the next height's center, giving a "Christmas tree" appearance to it.  CW graphs look like they can be incredibly useful to do a bunch of things, I just didn't figure out how to use them properly. 

 

Figured I'd give the heads up that the 3D parametric graph allows you to plot a bunch of points in a 3D space then color them as you wish. 

Attention new LV users, NI has transitioned from being able to purchase LV out right to a subscription based model. Just a warning because LV now has a yearly subscription associated with it.
0 Kudos
Message 2 of 2
(765 Views)