plot graph based on given values

3 visualizaciones (últimos 30 días)
Elysi Cochin
Elysi Cochin el 26 de Mzo. de 2022
Comentada: Star Strider el 30 de Mzo. de 2022
I have attached the data of cell count of different type of cells. The cell count of one type cell is given in each sheets .
Based on the attached data, please can someone suggest me what kind of plot to draw with the given data for preliminary data analysis.

Respuesta aceptada

Star Strider
Star Strider el 26 de Mzo. de 2022
Since they are histograms, I would do something like this —
sn = sheetnames('https://www.mathworks.com/matlabcentral/answers/uploaded_files/941694/my_excel_file.xlsx');
ns = numel(sn);
for k1 = 1:ns
figure(k1)
s{k1} = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/941694/my_excel_file.xlsx','sheet',k1);
hb = bar3(s{k1});
colormap(turbo)
for k2 = 1:numel(hb)
hb(k2).CData = hb(k2).ZData;
hb(k2).FaceColor = 'interp';
end
xlabel('x')
ylabel('y')
title(sprintf('%s',sn(k1)))
end
.
  12 comentarios
Elysi Cochin
Elysi Cochin el 30 de Mzo. de 2022
Thank you sir, thats what i asked. Thank you
Star Strider
Star Strider el 30 de Mzo. de 2022
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (1)

Simon Chan
Simon Chan el 26 de Mzo. de 2022
May be this:
sheets = sheetnames('https://www.mathworks.com/matlabcentral/answers/uploaded_files/941694/my_excel_file.xlsx');
edges = 0:20:1400;
N = zeros(length(sheets),length(edges)-1);
for k = 1:length(sheets)
rawdata = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/941694/my_excel_file.xlsx','Sheet',sheets(k));
[N(k,:),edges] = histcounts(rawdata(:),edges);
end
s = stackedplot(diff(edges)+edges(1:end-1),N','DisplayLabels',compose('Cell #%d',1:length(sheets)));
  2 comentarios
Elysi Cochin
Elysi Cochin el 26 de Mzo. de 2022
Editada: Elysi Cochin el 26 de Mzo. de 2022
Sir can you please say what you have plotted? Its the histogram of cell count, correct?
Simon Chan
Simon Chan el 26 de Mzo. de 2022
You are right, histogram of cell counts

Iniciar sesión para comentar.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by