LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4 dimensional plotting

I am wanting to know if labview does 4 dimensional plotting of points?  What I have in mind is I am recieving an array of values and I want to plott a graph in the x,y,z direction, for the first three columbs in the array and have the fourth columb determine the color or size of the dot plotted at the given value. 
For example:
 
Array:
0 | 0 | 0 | 10
0 | 0 | 1 | 5
0 | 0 | 2 | 1
0 | 1 | 0 | 0
0 | 1 | 1 | 8
0 | 1 | 2 | 2
1 | 0 | 0 | 6
 
Then the point blotted at (0,0,0) will be the bigest or brightest, the point plotted at (0,1,1) will be next, the point plotted at (1,0,0) will be next, etc. and the point at (0,1,0) will be the smallest or darkest. 
0 Kudos
Message 1 of 11
(4,850 Views)
Check the following example:

3D Plot with Pseudo 4th Dimension as Intensity
www.vartortech.com
0 Kudos
Message 2 of 11
(4,845 Views)
I looked at the example you suggested and it is really good.  However, I have a few things that are dificulties.  Right now the "plotting" VI uses the "get values" VI that works off of predefined equations that plott certain shapes.  I attempted to muck with the code a little to see if I could connect up an array straight to the inputs, put of course that creatted an error because it was the wrong data type.  Do you have an idea of how I could bypass the "get values" VI and enter strait from an matrix?
0 Kudos
Message 3 of 11
(4,831 Views)

Hi Musser,

This thread

http://forums.ni.com/ni/board/message?board.id=170&message.id=143663&jump=true

shows you how interact with the 3d plot using basic functions. If read off of posts in that thread, you should have enough info to get started.

Here is a preview of the code,

and the results

If you have follow up Q's please post.

If this helps, please post an example of your implementation to help others in the future.

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 11
(4,818 Views)
So I have been working with the following code that you made.  If I already have a 2D array (4X36000) where the first three rows are my X,Y,Z and the fourth is my magnitude that I want to be represented in color, could I just bypass the DATA IN string and the string to number block and simply enter the array strate into the for loop and into the Transpose 2D Array block?  What I mean by can I do this is will it graph a 3-D figure with the first 3 rows of my array and do the color with the 4th?  I tried this and it let me run the code, however all that was graphed was 2 lines.  Both lines were teal, which may be good since I am only entering the value one for the 4th row of my array.  However, I expected a cupe to be printed not 2 lines.  Attached is my attempted VI.  Do you know how I could get this to work?
0 Kudos
Message 5 of 11
(4,765 Views)

Hi Musser,

You can probably toss the big For loop because it is used to add a seperate plot with fixed line color to the graph.

Just run your data into the invoke node following where the collor map is defined.

If you still have trouble after that repost your updated code and I will try to take another look at it when I get back to a amchine with all of the VI's.

Still trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(4,760 Views)

Okay, so from the lables on the Invoke.  It looks like it is nesecary to put each portion of the array into it's spot seperately.  I did that by useing the Array subset block.  However, now it does not graph anything.  If you have any ideas let me know,

Thanks

0 Kudos
Message 7 of 11
(4,744 Views)
I was wondering how to set the values for what colors would show up on the graph?  If I wanted a range from 600 to 3600 where anything below 600 was the coldest color (purple) and it varried through that range till it got to the hottest color (red) at 3600, how would I set the chart to have the colors corespond to that number scheme?
0 Kudos
Message 8 of 11
(4,700 Views)
It looks to me like you would use the array of trace colors on the left side of the loop in Ben's example.
Message 9 of 11
(4,695 Views)
I see that a color from this array controls what colors are on the plot.  However, it looks like you enter an array of colors and that is what is used.  I want to enter an array of numbers and have it convert to different colors for the graph depending on what number is inputed.
 
0 Kudos
Message 10 of 11
(4,644 Views)