LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do intensity graph bounds change when x-scale becomes visible?

Solved!
Go to solution

I want to toggle the x axis of an intensity graph between visible and invisible.  When it becomes visible again, the bounds of the graph change.  I can avoid it by first reading the current bounds and then setting it again to that value (see attached VI).  Why is this happening, and is there a better way to avoid it?

 

0 Kudos
Message 1 of 4
(3,009 Views)
Solution
Accepted by topic author bracker

 

Bracker:

 

The intensity graph is bounded within the area defined by the graph and axes, and surrounded by the frame. The bounds change because the X-axis is part of the graph area. Instead of expanding the frame, it accommodates the axis labels within the draw area of the graph. (This is to prevent it disturbing other elements of the user interface by fixing the overall size of the intensity graph frame)

 

If you size the intensity graph draw area and remove the X-axis, you can see the behavior in reverse; the draw region will expand to occupy the space taken by the X-axis. If you add the X-axis, the draw region will shrink to accommodate the axis again.

 

If you want to keep the border even (like it is in your VI), then your workaround is probably the best way to do things (i.e. reset the bounds when toggling the axis).

 

Hope that answers your question!

 

bounds_expand.png

 

 

bounds_expanded_no_x.png

 

Caleb Harris

National Instruments | http://www.ni.com/support
Message 2 of 4
(2,981 Views)

Thanks!

0 Kudos
Message 3 of 4
(2,974 Views)

Just getting back to this post after seeing it answered elsewhere:  The answer is provided by Ben, Altenbach and others in various posts under the search term "Auto adjust Scales".

Message 4 of 4
(2,781 Views)