LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change color spectrum orientation in 3d plot

hi,
I have a 3d plot:
x-axis = wavelength
y-axis = angle of reflection
z-axis = intensity counts

the 3d surface is colored like the spectrum, now i want to rotate the color orientation, that it corresponds with the wavelength, but I do not want to change the axis. thanks.
Message 1 of 7
(3,323 Views)
Hi Robert,

This is not as easy as right-clicking...

I had posted a crude (er messy?) example that shows you how to define the color of each point plotted in 3-space.

The following link shows the result of doing a parametric plot using this method.

http://forums.ni.com/ni/board/message?board.id=170&message.id=84079&requireLogin=False

Look fo rthe LAST jpg I posted.

Unfortunately, I could not find where I posted the code. I needed Molly's help to get it posted because it was a 4 meg example.

What you want to do is use a custom color map and use the "w" vector to specify the color of the points. The values passed via the "w" vector must match up with your custom color scale.

Maybe someone else knows a better way. I'll watch for updates.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(3,312 Views)
Hi Ben,

ehm, I have a problem in adapting your advise. what exactly means color map and what is the/a "w" vector? I am from Germany and so my Labview is written. I couldn´t find anything matching your description.

thanks
robert
0 Kudos
Message 3 of 7
(3,303 Views)
You would think I could find my own answer!

Grrrrr.

Look at the attached jpg. It represents the portion of the code that is used to plot the surface.

Notes are included in the jpg.

NOTE:
It would be alot easier to swap you axis around and use the native functionality. The reason I resorted to this approach was I need to illustrate variations in the diameter of a pipe and the radius of the pipe was what I needed to grade the color of the points.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 7
(3,298 Views)
Additional note;

It turns out the first link I posted is the discusion with the whole demo.

Look for the 3M attachment.

Warning, it is not pretty, but it works and it is free.

Have fun,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 7
(3,288 Views)
thanks alot for your help
robert
Message 6 of 7
(3,272 Views)
You are very welcomE!

bEN
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 7
(3,262 Views)