Toolbar zoom button increases size of map instead of zooming in
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm working on someone else's code and running into a problem. A figure is created and two different graphs are placed on it - a map (axesm command) and a x-y graph (axes command). Everything in the map is being drawn correctly to start. When the user selects the zoom button in the toolbar and clicks on the map, though, the entire map increases in size instead of zooming in. And that means it overwrites the x-y graph below it, which I need to be able to see as I'm zooming in.
How can I fix the graph size so that the zoom function really just zooms in? I know I'm not giving enough information here, but I'm not sure how much of the code is relevant and don't want to post a giant code list that's meaningless.
Any help would be greatly appreciated! Thanks so much.
Michael
0 Commenti
Risposte (6)
Jan
il 19 Lug 2011
The difference between zooming and increasing the size is that for the later the pixels outside the axes rect are not clipped. Therefore I assume, that the Clipping property of the map is disabled in Matlab 2011 for unknown reasons. So please check:
get(ma, 'Clipping')
or whatever is the correct method to get the properties of the underlying image(?) object.
0 Commenti
Paul
il 27 Lug 2011
I have a similar problem, (occurs in 2009 and 2010 versions). Problem occurs after setting some axes properties.
Zoom works normally when running the following code segment.
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 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). 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, and I tried moving the set() after the first plot.
Anyone know how I could either fix zoom, or change the plot orientation without messing up zoom?
0 Commenti
HANS
il 25 Gen 2018
I need help in zoom.
After typed "set(newAxes,'View',[-90, 90]);"
then zoom is almost corrupted like 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 situation is same as thethe last comment before mines above.
Please could anybody help me to fix it ?
Thx, WR
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!