LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About intensity plot

Solved!
Go to solution

I am trying to plot a 2D array of measured values on an intensity graph. In the 2D array, some points are NAN values. I want to plot these NAN values as transparent colors, but the colors seem to be the same as the minimum values (the default color makes them black).

 

Is there a way to set the color of the NAN values to transparent in the intensity graph?

0 Kudos
Message 1 of 8
(2,428 Views)

Transparent does not seem to be allowed and it would not be very meaningful. You would just seem the color of the background at these places, which if of course just another non-transparent color.

 

Can you attach a simple example? How do you want it to look like?

0 Kudos
Message 2 of 8
(2,386 Views)

Hi altenback,

 

Thank you for the reply.

As attached, I set the background color to gray.

So if the NaN becomes gray as you suggested, it is also fine for me.

 

Is it possible to change the color of NaN only?

 

Best,

nobuyuki

 

 

0 Kudos
Message 3 of 8
(2,372 Views)
Solution
Accepted by topic author nobuyuki

You could replace NaN with INF and recruit the high color, for example:

 

HighHoles.png

(Note that in the current code you could do all in the first loop stack. I used a second stack assuming that the 2D array comes already preformed in the original code.)

0 Kudos
Message 4 of 8
(2,335 Views)

Thank you altenback.

 

I do not have the environment to use Labview at home, so I will try to do it next week.

It seems your way solves my issue.

 

Thanks,

nobuyuki

0 Kudos
Message 5 of 8
(2,322 Views)

Hi altenback,

 

Your way worked fine.

Thanks!

 

nobuyuki

0 Kudos
Message 6 of 8
(2,270 Views)

Glad it worked. Make sure you spell my name correctly, though. There is no "k" anywhere.

 

Also note that +inf does not interfere with auto-scaling to your regular data.

0 Kudos
Message 7 of 8
(2,263 Views)

Thanks, altenbach.

And sorry to mistake your name.

 

Best,

nobuyuki

0 Kudos
Message 8 of 8
(2,236 Views)