Filter löschen
Filter löschen

Changing plot orientation ruins zoom capabilities

2 Ansichten (letzte 30 Tage)
Paul
Paul am 24 Aug. 2011
Beantwortet: HANS am 25 Jan. 2018
I am trying to plot data in a gui. I want the Y axis to be horizontal, and the X axis to be vertical, and I want to be able to zoom in on the plot like normal.
Zoom works normally when running the following code segment.
numPlots = 1;
newHandle = figure(numPlots);
plot(X_pos,Y_pos,'r');
hold on;
plot(ord_X,ord_Y,'*');
hold off;
newAxes = get(newHandle,'CurrentAxes');
However, after this next line, zoom behavior changes.
set(newAxes,'View',[-90, 90],'YDir','Reverse');
With the new zoom behavior, single left-click does nothing, and boxing an area isn't allowed. To zoom in, you hold the left mouse button and drag up or to the right (down or to the left zooms out). The new zooming increases the size of the whole axes, rather than changing the scale of the axes. Additionally with the new zoom behavior, sometimes double clicking changes the angle the axes is viewed, and changes zoom back to normal.
Clipping is on, i tried changing the order of the children in the axes, i tried using 'cameraUpVector' rather than using 'view' to change orientation, and I tried moving the set() after the first plot(). I tried using versions 2009 and 2010. Nothing had an effect. It is possible that this problem is related to this thread:
Anyone know how I could either fix zoom, or change the plot orientation without messing up zoom?

Antworten (1)

HANS
HANS am 25 Jan. 2018
Hi to everybody,
I need help regarding to this topic.
Thx, WR

Kategorien

Mehr zu Visual Exploration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by