Issue using ScrollPanel function not plotting all axes

조회 수: 21 (최근 30일)
Cesar Correa
Cesar Correa 2017년 2월 9일
댓글: Cesar Correa 2017년 2월 13일
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

답변 (1개)

Adam
Adam 2017년 2월 9일
Try setting
hFig.Renderer = 'painters';
where hFig is your figure handle.

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by