How can I change Center Line, LCL, and UCL linestyles in controlchart for xbar and R charts.
조회 수: 10 (최근 30일)
이전 댓글 표시
I want to modify Shewhart Xbar and R control chart formats to work in greyscale. How can I change the line styles and colors for the Center Line, LCL, and UCL? I need them to be accessible for color blind users and cheap to print. (I'm a self taught Matlab beginner trying to teach it to undergrads...I am not trying to get you to do my homework for me.)
stats = controlchart(WeightsRevisedRows1_21_23_25,ChartType=["xbar","r"])

댓글 수: 0
답변 (1개)
Mathieu NOE
대략 19시간 전
hello Peggy
maybe try this
% Example: Create a control chart
data = randn(30,4); % Example data
controlchart(data);
% Access the chart's graphical elements
chart = gca; % Get current axes
lines = chart.Children % Access chart elements (lines, markers, etc.)
% Change the color of specific elements
Lightgray =[0.8, 0.8, 0.8];
Mediumgray = [0.5, 0.5, 0.5];
Darkgray = [0.2, 0.2, 0.2];
Black = [0, 0, 0];
lines(1).Color = Darkgray; % Change the first line to Dark gray
lines(2).Color = Lightgray; % Change the second line to Light gray
lines(3).Color = Mediumgray; % Change the second line to Medium gray
lines(4).Color = Black; % Change the second line to black
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!