LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d graph colour palette_more than 3 values

Hi guys,

 

Please refer to the attached image.

 

I need to show more than 3 colour values; preferably 1 value per corresponding colour.

 

Does anybody know how to do this?

 

Thanks,

 

Battler.

 

3D graph_colour palette.jpg

0 Kudos
Message 1 of 10
(4,555 Views)

Can anyone help me?

0 Kudos
Message 2 of 10
(4,506 Views)

Hi Battler,

 

I don't know if there is a simple way of doing this.  It doesn't look like this functionality is exposed as a property of the control.  You can take a look at the underlying XControl at <labview>\vi.lib\Math Plots\3D Math Plots\3D Scatter\3D Scatter XCtrl.  From here you can take a look at how this color ramp is created.  It looks like it's from an Intensity Graph.  It may be possible to add this functionality to the control, but that could be quite an endeavor.  It may be easier to hide the color ramp and fake it using an Intensity Graph of your own.

Jared S.
Applications Engineering
National Instruments
Message 3 of 10
(4,484 Views)

@jareds wrote:

Hi Battler,

 

... You can take a look at the underlying XControl at <labview>\vi.lib\Math Plots\3D Math Plots\3D Scatter\3D Scatter XCtrl. ...


Ah-hah!

 

I suspected that appraoch was used.

 

Best I suggest is to develop your own using arrays of color boxes or a picture control (but that is not trivial)... unless that XControl exposes something good.

 

Ben

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

Hi,

 

The property node exposes the following cluster.  From this I could build a custom scale of colour and corresponding value.

 

The problem is I cannot work out what the Colour Ramp Index means.  How does this index correspond to the values associated with each colour?

 

Is it out of 255?  So the value corresponding to a colour is:

 

((Colour Ramp Index) / 255) * (graph max.Z value - graph min.Z value) + graph min.Z value

 

Doesn't work out.  Anyone know?

 

 

Untitled.png

 

 

 

 

0 Kudos
Message 5 of 10
(4,437 Views)

I don't think you need to add the min.Z value to the color value.  Also, it might help to see what you're expecting and what you're actually getting.

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 10
(4,409 Views)

I am dealing with this issue now and this is what has worked for me (so far Smiley Wink ) and sorry no code but lots of words.

 

I customized an intensity plot to hide all but the color ramp.

 

Note:

To increase the number of colors in a that ramp just ctrl-copy the value in the legend and you have a new value.

 

Rather than provide  ramp between colors my app required binning the values to colors so the the array coming from the "ZScale.MarkerVals[]" got modified using epsilon to create the ramp.

 

For each color, I use a threshold 1d array to find the index of the value being plotted to find the range of the color to be plotted and then break down the LV color into RBG and scale the individual colors then pack them back together into the RGBA cluster for the 3d graph.

 

So far it works nice.

 

The customized intensity plot is a move that seems very "cluegy" but it is "100% G". Smiley Wink

 

Ben

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

Ben,

 

I'm back onto this topic.  Still no solution on my end.

 

1. I'm happy to know that it can be done.  2. I'm confused by your description of what you've done.

 

Code would be especially helpful!  Can you post anything at all?!

 

Thanks,

 

Battler.

0 Kudos
Message 8 of 10
(4,288 Views)

@battler. wrote:

Ben,

 

I'm back onto this topic.  Still no solution on my end.

 

1. I'm happy to know that it can be done.  2. I'm confused by your description of what you've done.

 

Code would be especially helpful!  Can you post anything at all?!

 

Thanks,

 

Battler.


 

About 11 years ago I was given a choice.

 

Option 1:

Take a job doing 100% LV with a ten minute commute good pay and good benefits. Drawback: I sign over all of my IP right to the company owner.

 

Option 2:

Find another job somewhere else.

 

I choose option #1 so....

 

No, I can't post any code since I post here only with permision from the company owner. But I am allowed to answer questions. Beisdes this work well with my belief that one of the greaest "good"s I can do in life is to help other "learn to do" (Think learn to fish).

 

So the best I can do is to encorage you to try to couble together some code with the hints I posted and post your example with specific questions and let other join to help you. Let me emhpesize the "others" since I will be off on one of those "wire-working" adventures for the next week.

 

Me_Train_Wheels.jpg

 

I hope that you are succesful and if you are please post an example since this question will come up again, sooner or latter.

 

Ben

 

 

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

Fair enough Ben.  Will do.

0 Kudos
Message 10 of 10
(4,257 Views)