how should i plot these data?

1 visualizzazione (ultimi 30 giorni)
marc
marc il 24 Mag 2019
Commentato: marc il 24 Mag 2019
hey everyone.how should I plot these data in maltba???? as long as every row's data with specific number shoud have specific color.
for example : the datas with rows number 10 should have same color
the datas with rows number 9 should have same color
......
an excel file is attached.

Risposta accettata

KSSV
KSSV il 24 Mag 2019
data = xlsread('Book1.xlsx') ;
x = data(:,1) ;
y = data(:,2) ;
plot(x, y); % a basic monochrome plot
% Trick surface into a 2-D plot
surface('XData', [x x], ... % N.B. XYZC Data must have at least 2 cols
'YData', [y y], ...
'ZData', zeros(numel(x),2), ...
'CData', [y y], ...
'FaceColor', 'none', ...
'EdgeColor', 'interp', ...
'Marker', 'none');
  5 Commenti
KSSV
KSSV il 24 Mag 2019
If you have columns of (x,y) and group column, use gscatter. Read about it.
marc
marc il 24 Mag 2019
ok.thanks a lot

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by