How to fill the markers in a plot?

400 次查看(过去 30 天)
Hello all,
Can some one tell me how can I fill the markers in the plot. My code is as follows. Please help me.
Z = readtable('Experimental_data_botheq.xlsx') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
data = table2array(Z) ;
plot(data(:,1), data(:,2), 'ko', 'linewidth', 2);
hold on
plot(data(:,3), data(:,4), 'ks', 'linewidth', 2);
hold on
plot(data(:,5), data(:,6), 'k^', 'linewidth', 2);
hold on
plot(data(:,7), data(:,8), 'kv', 'linewidth', 2);
hold on
plot(data(:,9), data(:,10), 'ko', 'linewidth', 2);
hold on
plot(data(:,11), data(:,12), 'ks', 'linewidth', 2);
hold on
plot(data(:,13), data(:,14), 'k^', 'linewidth', 2);
hold on
plot(data(:,15), data(:,16), 'kv', 'linewidth', 2);
hold off

采纳的回答

Matt J
Matt J 2022-10-6
Z = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1147865/Experimental_data_botheq.xlsx') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
data = table2array(Z) ;
plot(data(:,1), data(:,2), 'ko', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,3), data(:,4), 'ks', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,5), data(:,6), 'k^', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,7), data(:,8), 'kv', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,9), data(:,10), 'ko', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,11), data(:,12), 'ks', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,13), data(:,14), 'k^', 'linewidth', 2,'MarkerFaceColor','k');
hold on
plot(data(:,15), data(:,16), 'kv', 'linewidth', 2,'MarkerFaceColor','k');
hold off

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Test and Measurement 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by