subplot for 'controlchart' function
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Fercho_Sala
am 9 Apr. 2021
Kommentiert: Fercho_Sala
am 13 Apr. 2021
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
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Apr. 2021
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 Kommentare
Walter Roberson
am 13 Apr. 2021
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';
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!