Azzera filtri
Azzera filtri

How to fill the markers in a plot?

286 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Matt J
Matt J il 6 Ott 2022
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

Più risposte (0)

Categorie

Scopri di più su Test and Measurement in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by