필터 지우기
필터 지우기

How to differentiate between each plot when every time I change the parameters from GUI, it updates same figure with new output?

조회 수: 1 (최근 30일)
I have designed one GUI for my technical analysis and comparison of process and controller output.Each time when I change the external parameters from GUI,I am getting same colour output(i.e blue)in same window.When I am comparing two or more outputs,it is becoming little confusing for me to analyse the performance. Is there any other way to segregate/differentiate one output from another?

채택된 답변

KSSV
KSSV 2016년 11월 7일
You can mention color.
plot(x,y,'color','r') ; 'r','b','g' etc...
As it is inside gui, you may not mention color. You may use
plot(x,y,'color',rand(1,3))
Or:
C = {'r' 'b' 'g' 'y' 'm' 'k' 'c'} ; % mention all colors here
plot(x,y,'color',C{randsample(1:length(C),1)}) ; % select color randomly from C
  댓글 수: 5
shrivardhan  suryawanshi
shrivardhan suryawanshi 2016년 11월 15일
편집: shrivardhan suryawanshi 2016년 11월 15일
C = {'r' 'b' 'g' 'y' 'm' 'k' 'c'} ; % mention all colors here
plot(x,y,'color',C{randsample(1:length(C),1)}) ; % select color randomly from C
this code I am using for plotting graaph. I have one more question KSSV, Can we select these colours in the same sequence as given in order C = {'r' 'b' 'g' 'y' 'm' 'k' 'c'} instead of using 'randsample'
Awaiting your response. Thank You.
KSSV
KSSV 2016년 11월 16일
That case, put a count how many times you are calling that function and use this count.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by