Showing results for 
Search instead for 
Did you mean: 

Making an intensity graph work with arrays of different sizes

Go to solution

Here is my problem.  If I first load a 20x20 array of doubles into my intensity graph, this array takes up the entire field of view. If I later load a smaller 10x10 array, only a quarter of the field is occupied as shown below.  Conversely, if I load a larger array, not all of the contents are displayed

Is there any way that I can rescale this graph (for lack of a better term) to work with inputs of different sizes?




0 Kudos
Message 1 of 7

Set the x an y axis to autoscale.

0 Kudos
Message 2 of 7

I tried setting XScale.ScaleFit and YScale.ScaleFit to 2. I also verified that autoscale is set on both axes.  That didn't do the trick.

0 Kudos
Message 3 of 7

Please attach a simplified version of your vi. Preferably LabVIEW 2020 or older.

0 Kudos
Message 4 of 7

Here is a simplified VI, as requested.  If you click on the toggle, you can see that one of the images occupies the entire graph, whereas the smaller one doesn't. This creates a problem for us when we attempt to load images of different sizes.

Any suggestions for how to approach this?  I tried a bunch of properties in the intensity graph, but none of them did the trick.

0 Kudos
Message 5 of 7
Accepted by topic author Ninja-trainee

Turn off "loose fit" for both axes or change the axis formatting to show at least two decimal digits.


(With loose fit enabled, it will round to the nearest "nice" value for the limits, which is tricky with a 0.05 increment and markers limited to zero digit precision, i.e. whole numbers.)

0 Kudos
Message 6 of 7

That did the trick. Thanks. I do have a problem with the x- and y-axes, but that's a separate issue that I'll raise later.  Again, thanks.

0 Kudos
Message 7 of 7