09-30-2010 05:58 PM
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?
Solved! Go to Solution.
10-04-2010 09:39 AM - edited 10-04-2010 09:43 AM
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!
10-04-2010 09:49 AM
Thanks!
02-17-2011 09:09 AM
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".