How can I change Center Line, LCL, and UCL linestyles in controlchart for xbar and R charts.
10 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Mathieu NOE
ungefär 19 timmar ago
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 Comments
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!