Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the pan/zoom history reset with every PlotXY()?

Hi,

I'm using the ScatterGraph.PlotXY(double[], double[]) function to plot some individual data points.  Interactive panning/zooming and undo/reset work just fine.  But if I apply a series of pans/zooms and then call PlotXY again with new data, I can't seem to undo/reset back to the original axes' limits anymore.

I couldn't find this behavior documented in the Measurement Studio help in Visual Studio, hence my question here.  If this is the way it's supposed to work, I'll try to cobble together something by hand to get the functionality I was hoping for.

Thanks for any help/insight in advance.

~Muzu.

Details:
Measurement Studio 8.0 Professional
NiDAQ 7.3
Visual Studio 2003
.NET Framework 1.1
Windows XP SP2
0 Kudos
Message 1 of 6
(4,320 Views)

Muzu,

The behavior you are experiencing is how we would expect the ScatterGraph to operate.  Every time you plot a new set of data on ScatterGraph, the axes will adjust to fit the data.  The values of the axes that are set once you plott the data will be the default values that that the ScatterGraph will revert to if you call the ResetZoomPan function.

In your case I believe you are trying to revert to the axis values of previous set of data using the ResetZoomPan function after plotting a new set of data.  Because you have plotted a new set of data, the axis values for your new data will be the values that the ResetZoomPan function will revert to.  Therefore, if you plott a new set of data and executed the ResetZoomPan function nothing will happen because the graph is set to the default axis values already.

 

Regards,

Santiago D

NIC

0 Kudos
Message 2 of 6
(4,299 Views)
Thank you for the reply!

Yes, your understanding of the scenario I was describing is correct.  In my original post I forgot to mention that for both x- and y-axes, I've set Mode.Fixed, but from your explanation I can see why it wouldn't make any difference.

I was hoping that since the axes' were in fixed mode, it wouldn't be a problem for unpanning/unzooming to revert the user back to ranges that wouldn't necessarily show all of a newly-plotted dataset.  Or in other words, when plotting new data, the pan/zoom history would only be reset when Mode was AutoScaleLoose or AutoScaleExact.

My workaround was to implement separate stacks for XAxis.Range and YAxis.Range and to handle the Pan/Zoom/ZoomPanReset/ZoomPanUndone events manually.

Thanks again for your help!

~Muzu
0 Kudos
Message 3 of 6
(4,295 Views)

Hello,

 

For our application, the default behavior of zooming to show all signals while adding a new one is very unwanted. 

Our users does not want that. We should be able to add signals without having this constrain (we should be able to keep the same view either if the new signal is not into view).

 

In fact i'm searching very hard to find another product because this feature give me a real hard time because I have to manage all zooming manually.

You should take D3 (dynamic data display) as good example of behaviors. Also you should keep synchronized to 0 (zero) on every axis.

 

Thanks,

Eric

0 Kudos
Message 4 of 6
(3,557 Views)

Have you tried configuring the Mode of the axis? It sounds like you are using AutoScale when you need Fixed. Fixed will not change the viewing rect when new data is added. You will likely want to change this property for both the XAxis and YAxis.

National Instruments
0 Kudos
Message 5 of 6
(3,545 Views)

Hello there,

 

I guess what your are looking for is the Fixed scale mode on the axis. If you want to have control over the range values when data is cleared or new data is plotted, you should use the Fixed scale mode.

 

Hope this helps!

 

Vijet Patankar

National Instruments

0 Kudos
Message 6 of 6
(3,543 Views)