How do I use dynamic cursor data to zoom in and zoom out of a graph plot?

조회 수: 4 (최근 30일)
Through File exchange, I have come across a code that lets me use dynamic data cursors.
dualcursor on; val = dualcursor;
%val = [x1 y1 x2 y2];
Now I can set the xlim using xlim([val(1) val(3)]);
Ideally this should update my plot to the selected values of x-axis values.
However, I think the val = dualcursor picks the values of the dual cursors when it is initally plotted. But for my GUI I need something more dynamic, something that updates the values of val based on x axis values selected.
Please help.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by