LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity Graph Ramp autoscale unexpected behavior

Solved!
Go to solution

I am currently working with an intensity graph to display camera images. Since these change in brightness quite often I need to use autoscaling for the z axis of my intensity graphs. This by itself is working fine but the ramp display of the z scale is wrong.

 

I have attached a simple VI to replicate the issue. Here a linear increase from 0 to a variable upper bound is displayed in an intensity graph. When "Autoscale Z" is turned on, the colors on the intensity graph will always go from black through blue to white independent of the upper bound as expected. However, the ramp is displaying the wrong colors unless the upper bound is 100. It will correctly scale its range from 0 to the upper bound but the color white is always reached at a value of 100.

 

According to this thread I found, this is kinda expected behavior in that the color scale is set for fixed marker values. https://forums.ni.com/t5/LabVIEW/Intensity-Graph-Z-Autoscale-bug-8-5-1/m-p/769425#M352375

However, this does not seem like something that should happen since it causes a mismatch between the graph and the color scale displayed as a legend, thus making the color ramp completely useless.

 

Am I missing something here? Or is there any reason as to why this behavior would be intended in some other use case?

And in either case, is there a better solution than to create my own autoscaling?

0 Kudos
Message 1 of 3
(60 Views)
Solution
Accepted by topic author MarkusSt

That has never worked right and I agree it is a bug. I would just rewrite the markers, e.g. as follows:

 

 

altenbach_0-1637859496224.png

 

(not sure why your "upper bound" control was inside the loop. Do you expect it to change during the loop? You inner loop also always produces the same result. Not sure why you think you need to repeat it 101 times)

 

Message 2 of 3
(32 Views)

Yeah, that's similar to what I thought might be the only workaround implemented in an elegant way, thank you.

 

I have by chance found another workaround as well though: Setting the ColorTable property of the intensity graph will then also display it correctly on the ramp.

 

As to your other questions: There was no reason except for the fact that I didn't really think about it and just wanted to quickly get the example array to display in my graph (originally I used random numbers so that's why there were two loops).

0 Kudos
Message 3 of 3
(19 Views)