LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Link z scale marker to data without autoscale for intensity graph

Solved!
Go to solution

When we directly change the marker value without autoscale, no changes may take place onto the plot of intensity graph. So how can we link the marker values of z scale to the data shown on the plot?

 

To be more specific, because many people may prefer that they have the intensity graph for different data sets with the same z scale so that they can visually compare the z-scale value very easily by compare the color. But for different data sets, they may get different range and doing auto scale will result in trouble for having same z scale.

However, when we disable autoscale and just make the z scale marker the same, actually the graph will no longer truly connected with the plot and thus making it impossible to compare z values from the plot.

One way I have tried is to change the range instead of the marker, but it does not work for z scale that when we get negative value for z scale marker location, the graph just get something very weird like only black and white.

So how can we set two intensity graph to the same z scale and z scale markers and meanwhile having the graph link to the data we have?

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

Hi weirpenguin,

 

I don't know if this helps or not, but please take a look at the example called Common Intensity Maps.vi in LabVIEW->Find Examples->Search->intensity->Common Intensity Maps. In that example, see the property node on the Block Diagram where the Color Table is set.

 

Regards

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(4,484 Views)

Hi NathanS,

 

Thank you for your reply, but my question may be a little different.

In this example, the colormap can be changed by two ways, changing the data or the color table.

However my intention is to change the z scale marker value without change the data and make sure the z scale still properly connected to the data.

As we know, by just change value in the property node marker[] and disable the autoscale will make the scale marker look like what we want but meanwhile unlink the scale from the data. If you get a data where x range from 0-80, you can change x scale marker in the marker[] or the multiplier and offset for x scale thus making the x scale look like -80-80, but actually you are still looking at the data with x value 0-80.  For x and y axis, we can change the value in the range property node and have the graph plot the data for x value -80-80, where we may see black colormap for -80-0 which implies there is no data here. However, when we use the range property node for z axis, we may get the colormap really weird if we set the range bigger than than the original one.

So how can we enlarge the range of the z scale and set marker value for it? For example, if we get a data whose z value range from 0-80, how can we set the z scale range to 0-100 and set the markers 0,10,25,47,68,90?

 

Will

0 Kudos
Message 3 of 10
(4,479 Views)

Hi weirpenguin,

 

Unfortunately, I am having a hard time understanding what you mean by saying that the scale becomes "unlinked" from the data. Therefore I am uploading a simple example of the last sentence in your post:

 

"For example, if we get a data whose z value range from 0-80, how can we set the z scale range to 0-100 and set the markers 0,10,25,47,68,90?"

 

Please take a look at it and let me know how this example specifically does or does not do what you want.

 

Regards,

 

[The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense]

Nathan S.
Applications Engineer
National Instruments
Message 4 of 10
(4,466 Views)

Hi, NathanS,

 

Thank you for your reply.

 

For "unlinked from data", as an example, if we get z scale from 0-80, when we try to enlarge the range by input a value greater than 80 like 100 to the maximum of the z scale range property node, the grpah will turn all white because the z scale does not support markers whose location is out of 0-255. And we can change the the max marker to 100 by just change the multiplier and offset and get a marker 100. However, this marker still stands for data of 80 actually although we have 100 on the scale. This is "unlinked from data"

 

And for your exapmle, sorry I just have got a older version and thus can not open it. So would you like to give me another copy in older version or just give me some ideas about it?

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

Hi weirpenguin,

 

What version of LabVIEW are you using? Thanks.

 

Regards,

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(4,445 Views)

Hi, NathanS,

 

I am using the LabView 2009.

 

Thank you.

 

weirpenguin

0 Kudos
Message 7 of 10
(4,438 Views)

Hi, NathanS,

 

I just got a chance to look at your example at another computer. One different point is that I am using a graph whose representation is U8 instead of DBL. While the method of changing the range of z-scale works for DBL represented graph, for U8 ones, when you enlarge the range, making the maximum bigger or minimum smaller, the whole graph will get spoiled.

 

Unfortunately, I am not sure whether I am allowed to change the representation of the graph because I get the graph data from one subvi built by someone else. So how can we do the same thing for U8 represented graph?

 

Thank you.

 

Weirpenguin

0 Kudos
Message 8 of 10
(4,423 Views)
Solution
Accepted by weirpenguin

Hi weirpenguin,

 

Please see the new example. I have changed it to LabVIEW 2009 and U8. 

 

If the chart is U8, that means that the data cannot be outside the range of 0-255 anyway, right?  U8 is only 0-255. So why would you enlarge the range to be bigger than 0-255?

 

Regards,

Nathan S.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 10
(4,416 Views)

Hi NathanS,

 

Thank you, that make sense now.

Thank you for your patience and help for my question.

 

Weirpenguin

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