06-18-2009 10:37 AM
When a graph is zoomed over only its X axis, the Y range retains its values for the entire data range. I'd like the Y range to be adjusted and scaled for only those Y values now plotted on the zoomed graph. Is it possible to have this happen automatically without resorting to code to accomplish it ?
06-19-2009 10:33 AM
Good Morning SteveP,
The Y-axis will automatically zoom to the data that is currently displayed if you use the X Scrollbar to select what you view.
To display the X Scrollbar, right-click on your graph, select Visible Items»X Scrollbar.
06-19-2009 10:41 AM
06-19-2009 10:42 AM
06-19-2009 11:20 AM
The Y Scale will auto-scale when the X ScrollBar is used to scroll the X axis of an already zoomed Graph. It does not autoscale if an XY Graph is used instead. Is there a fundamental reason this does not happen for an XY Graph ? None the less, the X ScrollBar does not allow the X axis limits to be selected. It mearly scrolls the already zoomed and fixed X axis range. The Graph Pallete allows the X axis zoom limits to be chosen by use of its zoom-X-axis only control.
I would like this behavior for an XY Graph.
LabVIEW 8.6.1
Steve
06-19-2009 11:42 AM
I asked NI about this then I had some problem and was using 7.0. The message was that this was not a bug. So then you use autoscale Y on a XY graph it uses the full range to calculate the scale settings. I some sort of fixed this way. This is perhaps fixed in later versions
06-22-2009 11:33 AM
Good Morning Steve,
As you have likely determined, this is not built-in behavior of the XY Graph. However, the code needed to make it bahave as you wish isn't too tricky. I attached a basic example which I think makes the XY Graph act the way you intend for it to.