MATLAB Answers

using magnify with image on uipanel

3 views (last 30 days)
Nilimb on 19 Jun 2011
Hi, I am using this file for magnifying images on a figure. It works fine if the image is parented to figure. As soon as i parent the image to uipanel it does not magnify the region properly. Anybody know a workaround to that.

Answers (1)

Jan on 19 Jun 2011
Please explain "not properly" with some details. This works fine in Matlab 2009a:
panelH = uipanel('Position', [0.2, 0.2, 0.5, 0.5]);
axesH = axes('Parent', panelH);
plot(rand(1, 100));
The function MAGINIFY is fragil: It sets the figure coordinates to pixels, overwrites the UserData of the figure and the axes, uses the CurrentAxes and fails if it has a hidden handle. Perhaps this collides with your GUI design.
Jan on 20 Jun 2011
Let me repeat: Please explain "not properly" with any details.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by