How to fill the markers in a plot?

390 ビュー (過去 30 日間)
Vishnuvardhan Naidu Tanga
Vishnuvardhan Naidu Tanga 2022 年 10 月 6 日
回答済み: Matt J 2022 年 10 月 6 日
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 Center および File ExchangeTest and Measurement についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by