Zooming in axes in GUI causes axes to expand.
Ältere Kommentare anzeigen
I have a axes where I am plotting my XYZ data using plot3(X,Y,Z,,'b.').
So far so good, but when I want zoom in on the axes, the extent of that axes increases and it goes beyond the predefined size in the GUI such that it starts covering the whole GUI.
How to prevent this from happening so that when I zoom the size of the axes does not change?
Antworten (5)
Jan
am 23 Jul. 2011
1 Stimme
Is your problem related to tis thread: http://www.mathworks.com/matlabcentral/answers/11882-toolbar-zoom-button-increases-size-of-map-instead-of-zooming-in ?
1 Kommentar
Sukuchha
am 24 Jul. 2011
I'm using GUIDE to create a UI interface that has a map. When I try to Zoom I've the same issue. This solution worked with me:
- make a panel
- choose panel border to be 'none'
- insert the axes (i.e. your map) inside the panel
- The problem is still there, but it is bounded by the panel, so it is not visible
1 Kommentar
NitzBr
am 16 Jun. 2020
YES!
Great sulotion, thank you!
Walter Roberson
am 23 Jul. 2011
0 Stimmen
Is this plot inside a uipanel? If so then you need to set the uipanel Clipping property.
1 Kommentar
Sukuchha
am 23 Jul. 2011
Bilen Oytun Peksel
am 12 Nov. 2012
0 Stimmen
The problem here is:
If the view angles (az,el check out 'help view') are set to different values than usual xy xz or yz views the zoom behaviour changes. For 2D axis zoom manipulates axis limits thus axis size is retained. If however the view angles change into some other value with for instance rotate3d function zoom function begins to manipulate 'cameraposition' or 'cameraviewangle' which makes the axis grow on the screen. In theory it can be avoided by adjusting the axis limits accordingly but when you do it it behaves strangely and not as intended.
I am having the same problem myself and assigning the axes as a children of other objects like uipanel doesnt help. Only solution I came up with was to make another figure docked into the main figure. The axes is assigned as the child of that figure. However I am still struggling with the docking stuff.
fenix.d.0831
am 3 Nov. 2017
0 Stimmen
my solution is to set the axes as parent of the plot
for example:
h=plot(x, y); set(h, 'parent', axes)
Kategorien
Mehr zu Data Exploration finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!