How can I change Center Line, LCL, and UCL linestyles in controlchart for xbar and R charts.
9 次查看(过去 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
about 19 hours 前
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!