필터 지우기
필터 지우기

How to generate a stacked plot with a scroll bar?

조회 수: 49 (최근 30일)
Jay Vaidya
Jay Vaidya 2020년 7월 2일
댓글: Min 2024년 1월 9일
I have a lot of signals that I have plotted in the image below. But, some of them are not displayed. The total number of signals is 64. Is there a way that I can have a stack plot with uniform-sized graphs but scroll option to see all the graphs.
  댓글 수: 1
dipak nigam
dipak nigam 2020년 7월 5일
Hi, as per my understanding you want to insert a scrollbar to move through the plot. You can find a possible solution to insert a scrollbar in the given ML answer link.

댓글을 달려면 로그인하십시오.

채택된 답변

Monisha Nalluru
Monisha Nalluru 2020년 7월 10일
The ability to use scrollbar in MATLAB figure window is not available.
But as an work around you can download a File Exchange or
You can use something like this
figure
panel1 = uipanel('Parent',1);
panel2 = uipanel('Parent',panel1);
set(panel1,'Position',[0 0 0.95 1]);
set(panel2,'Position',[0 -1 1 2]);
set(gca,'Parent',panel2);
A=rand(25,1);
B=rand(25,1);
plot(A,B); % replace your stack plot fucntion here
s = uicontrol('Style','Slider','Parent',1,...
'Units','normalized','Position',[0.95 0 0.05 1],...
'Value',1,'Callback',{@slider_callback1,panel2});
function slider_callback1(src,eventdata,arg1)
val = get(src,'Value');
set(arg1,'Position',[0 -val 1 2])
  댓글 수: 1
Min
Min 2024년 1월 9일
Hi Monisha Nalluru, I was trying to run the code with the answer you had but there was an error using UIpanel. "Value must be a handle".
I do not have a good understanding of UIpanel to solve this problem, would you be able to help me?
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by