LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to choose color marker in intensity plot

Solved!
Go to solution

Hi There,

 

I am trying to plot my 2D data file in intensity plot. I want to that color plot should be like Red as maximum value while Green as minimum and 0 value should be yellow. I looked at this example http://digital.ni.com/public.nsf/allkb/1ADFF221E27F5B5886256E6F007C7B58?OpenDocument , but in this example they are deciding marker beforehand. In my file i want to choose marker based on maxima and minima value.

 

Thanks

Yogesh 

0 Kudos
Message 1 of 14
(4,545 Views)
Well, you can use "array min/max" on your data and built the Z-scale.marker.values cluster array based on the results. It does not need to be a diagram constant. Let me know if you need help with that.
Message Edited by altenbach on 05-31-2009 12:07 PM
0 Kudos
Message 2 of 14
(4,542 Views)

Hi,

i tried this method and i do not know what is wrong but this one is not working. Also i want maxima and minima to defined by red and green (actually i am using 90% of maxima and minima to be this color and any value higher or lower then that as black color). But i want zero value to be yellow color.

 

Thanks

Yogesh 

0 Kudos
Message 3 of 14
(4,537 Views)

How about something like this?

 

Message Edited by altenbach on 05-31-2009 12:18 PM
Message 4 of 14
(4,536 Views)

It might be a stupid question but how do you make that array with color box in it?

 

Thanks 

0 Kudos
Message 5 of 14
(4,533 Views)

Yogesh9ic wrote:

i tried this method and i do not know what is wrong but this one is not working.


Sorry, I dod not see your post. Of course you can just multiply the limits by 0.9. Of course you should also reasonable handle cases where them min is larger than zero, for example What is zero is not between max and min?

 

Anyway, you certainly have way too much code. Why are you reshaping a three-element 1D array to same??

 


Yogesh9ic wrote:

But i want zero value to be yellow color.


Then don't calculate the average between max and min, just use a zero diagram constant for the middle element as in my example.

Message 6 of 14
(4,532 Views)

Yogesh9ic wrote:

It might be a stupid question but how do you make that array with color box in it?


Get to the array palette and drop an empty array container on the diagram. Then go to the "graphics & sound...picture functions" palette and drop a color box constant in the array container. Resize to three elements and set the color of each. 😄

0 Kudos
Message 7 of 14
(4,530 Views)

I tried your method but somehow marker color is not changing. Do i have to change anything on intensity plot so that it should take marker value from property node.

 

Thanks

Yogesh 

0 Kudos
Message 8 of 14
(4,526 Views)
Can you attach a simplified version of your VI?
0 Kudos
Message 9 of 14
(4,524 Views)
Solution
Accepted by topic author Yogesh9ic

Here's a simple example. I did not change anything execpt to show the z-scale markers with 1 decimal digit (default is zero). This is just cosmetic.

 

Message Edited by altenbach on 05-31-2009 12:50 PM
Message 10 of 14
(4,520 Views)