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.
  1 件のコメント
Cesar Correa
Cesar Correa 2017 年 2 月 13 日
I tried, but got no solution

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by