Issue using ScrollPanel function not plotting all axes

21 vues (au cours des 30 derniers jours)
Cesar Correa
Cesar Correa le 9 Fév 2017
Commenté : Cesar Correa le 13 Fév 2017
Hello, i have the following issue. I am using the ScrollPanel (I leave the link to this function bellow) into a GUI figure so i can have 27 diferents axes. The thing is that whenever I run it, some of the axes dont appear while other only appear the half. (sorry for my bad english).
Here is the code i use for creating the scrollpanel window and the axes:
{
%%Creating the Scroll figure
x = 1;
y = 3.5;
dx = 0.4;
dy = 0.4;
hpanel = ScrollPanel('Position',[.025 .05 0.95 0.6],'ScrollArea', [1 1 x y]);
set(hpanel.handle,'Backgroundcolor',[1 1 1]);
%%Creating the axes and plotting
% py is change after every plotting so that the axes dont overlap eachother.
imdata = imread('logo.png');
px = 0.01;
py = 0.06;
% Plotting each axes independently ( I now a for would be nicer)
ax1 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow; pause(2)
ax2 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax3 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax4 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax5 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax6 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax7 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax8 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
ax9 = axes('Parent', hpanel.handle, 'OuterPosition', [px py dx/x dy/y]);
image(imdata); py = py + dy/y + 0.02; drawnow;pause(2)
}
I leave a picture so you can see more clearly what I'm talking about.
I have tried many things but not getting anywhere.
Beforehand, thank you.
Link to the ScrollPanel function: https://www.mathworks.com/matlabcentral/fileexchange/29776-scrollpanel

Réponses (1)

Adam
Adam le 9 Fév 2017
Try setting
hFig.Renderer = 'painters';
where hFig is your figure handle.

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by