Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity Graph & Scale

One quick intensity graph question.

Object: 3D graph with a top view (X-Y)

I want to create an intensity graph in Visual C++ with a set scale such as red representing 11-12, orange representing 9-10, yellow representing 7-8, green representing 5-6, blue representing 3-4, and purple representing 1-2. Is there anyway to do that? Is there anyway to also display the scale that shows the color range? Thanks.
0 Kudos
Message 1 of 6
(4,368 Views)
You can create a custom color map to do this. Check out the Color Map Styles example in the Examples\Ui\Graph3D\Color Map Styles folder under your Measurement Studio for Visual C++ installation folder to see example code for configuring custom color maps.

- Elton
0 Kudos
Message 2 of 6
(4,368 Views)
What about displaying the colour bar next to the graph to show the range? Is this possible?
0 Kudos
Message 3 of 6
(4,368 Views)
Unfortunately this is not supported by the 3D graph. In the scenario that was described in the original post the 3D graph is being used to display an intensity plot, but ultimately this is just something that the 3D graph can be configured to do and is not what the 3D graph was primarily designed for. I haven't tried this, but you might be able to fake it adding another 3D graph and then configure it (resize to the shape of the color bar, plot intensity data that represents the scale, etc.) and maybe add labels at the top and bottom to create something that ultimately looks like what you're looking for.

- Elton
0 Kudos
Message 4 of 6
(4,368 Views)
What I did to show the range is that I created five NI CWButton Controls and set all of them as 3D square LEDs. I selected the mode indicator and for the off color, I showed the color for a certain range. That's my method for the color bar.
0 Kudos
Message 5 of 6
(4,368 Views)
I am using a NiSlider and add a Pointer for each color scale. It is working fine. I still looking for a better solution which is inpolate the colors.
0 Kudos
Message 6 of 6
(4,368 Views)