subplot for 'controlchart' function

조회 수: 3 (최근 30일)
Fercho_Sala
Fercho_Sala 2021년 4월 9일
댓글: Fercho_Sala 2021년 4월 13일
Hello,, I was wondering if somebody knows how to subplot with the 'controlchart' function , apparently the normal routine .. subplot(2,2,1) etc, doesn’t work. Thanks

채택된 답변

Walter Roberson
Walter Roberson 2021년 4월 9일
Use the 'parent' option
ax(1) = subplot(2,1,1);
plot(ax(1), rand(1,20));
ax(2) = subplot(2,1,2);
load parts
st = controlchart(runout,'chart',{'xbar'}, 'Parent', ax(2));
Note: when you use 'Parent', you can only 'chart' one chart at a time, because when you ask to chart multiple items, it needs to create subplots.
  댓글 수: 3
Walter Roberson
Walter Roberson 2021년 4월 13일
Suppose that you parented to an axes handle named ax, then
ax.Children(1) %-> handle to LCL/UCL line
ax.Children(2) %-> handle to Center line
ax.Children(3) %-> handle to Violation line
ax.Children(4) %-> handle to Data line
You can use those to change colors, such as
ax.Children(1).Color = 'k';
ax.Children(2).Color = 'm';
Fercho_Sala
Fercho_Sala 2021년 4월 13일
Thank so much for your help :)

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

추가 답변 (1개)

Fercho_Sala
Fercho_Sala 2021년 4월 10일
Thanks a lot Walter, it helped so much :) , probably I will ask you some stuff about this funtion in the near future.

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by