03-04-2013 06:47 AM
I am plotting data to a XY-graph and an Intensity Graph.
For the XY-graph I use offset=0, multiplier=1, Y-min=0 km, Y-max=10 km. When I plot an array of 2730 point, they scale correctly within that 10 km Y-axis. I then set the Y-max to 15 km and then decimate the array to 1638 points an plot again and the graph is OK.
For the Intensity Graph I have to do it differently: Offset i 0, mulitplier=0,0225, Y-min=0 km, Y-max=10 km. When I plot an array of 2730 point, they scale correctly within that 10 km Y-axis. I then set the Y-max to 15 km and then decimate the array to 1638 points and plot again. Now the scaling is wrong, so I have to set the multiplier to 0,0375. But now the Graph BY ITSELF changes the Y-max to 25, so I have to manually set it back to 15 again.
Why do I at all have to use a multiplier other 1 for the Intensity Graph, but not for the XY Graph? And why does the Intensity Graph by itself change Y-max after the second operation I describe? Both graphs have Autoscale-Y=Off. LabVIEW 2011.
03-04-2013 02:06 PM
Can you attach a simple example that demonstrates the problem? Thanks!
Offset and multiplier define the linear relation between array index and value. On an xy graph, you graph the actual numeric values.
On an intensity graph, you plot a 2D grid of values from a 2D array, where each element is only specified by the array index coordinates. The offset and multiplier setting for each axis defined the translation to the axis coordinates. the max and min define what range is displayed. Sometimes you need to be careful to change these things in the right order to avoid unusual results.
03-06-2013 03:07 AM
Here is the example. I originally use LabVIEW 2011, but the example code is LabVIEW 8.0
03-08-2013 01:24 PM
Yes, these settings interact, so you need to reset them whenever one of the others change. A similar issue arrives of you e.g. have cursors.
I don't understand why you need to duplicate and sequentialize (sic) your code so much. One instance of all inner code is all you need! For example, in the attached modification you can change Ymax via a control and it will do all you algorithms on demand. No local variables or shift registers needed.
03-08-2013 04:27 PM - edited 03-08-2013 04:30 PM
OK. I understand there is no way around having to reset Y-max finally, but to me that seems like a stupid LabVIEW annoyance which makes no sense. Looks more like a bug to me.
Thanks anyway.
The layout of my example shouldn't be assessed too much while it's just an example where I wanted to explain each step.