Capaplot: Color change possible?

조회 수: 1 (최근 30일)
fr_sk
fr_sk 2015년 10월 23일
답변: Sudhanshu Bhatt 2015년 10월 28일
Hi, I want do use a Process capability plot ('capaplot') of a dataset but the usual commands (.facecolor and .edgecolor) do not change the color of the plot. Is there a command that would work? Thanks in advance :-)

채택된 답변

Sudhanshu Bhatt
Sudhanshu Bhatt 2015년 10월 28일
Hi fr_sk,
I understand that you are trying to change the color of the plot.
Below is a sample code for demonstration purposes, which might be helpful in solving this issue:
% Create a capaplot, the code to create a capaplot can be found in the documentation page.
% Documentation link : http://www.mathworks.com/help/stats/capaplot.html#bt53f2o
rng default; % For reproducibility
data = normrnd(3,0.005,100,1);
S = capability(data,[2.99 3.01])
capaplot(data,[2.99 3.01]);
grid on
% Now we use the command "gca" to get the axes where data is plotted
myPlotAxes = gca
% In myPlotAxes, choose the patch
child = myPlotAxes.Children(2)
% Change FaceColor and EdgeColor properties
child.FaceColor ='r'
child.EdgeColor ='g'
Thanks
Sudhanshu Bhatt
If this does not resolve your issue, please create a Technical Support Request by visiting the link below:

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by