plot graph based on given values

조회 수: 3(최근 30일)
Elysi Cochin
Elysi Cochin 2022년 3월 26일
댓글: Star Strider 2022년 3월 30일
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.

채택된 답변

Star Strider
Star Strider 2022년 3월 26일
Since they are histograms, I would do something like this —
sn = sheetnames('');
ns = numel(sn);
for k1 = 1:ns
s{k1} = readmatrix('','sheet',k1);
hb = bar3(s{k1});
for k2 = 1:numel(hb)
hb(k2).CData = hb(k2).ZData;
hb(k2).FaceColor = 'interp';
  댓글 수: 12
Star Strider
Star Strider 2022년 3월 30일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변(1개)

Simon Chan
Simon Chan 2022년 3월 26일
May be this:
sheets = sheetnames('');
edges = 0:20:1400;
N = zeros(length(sheets),length(edges)-1);
for k = 1:length(sheets)
rawdata = readmatrix('','Sheet',sheets(k));
[N(k,:),edges] = histcounts(rawdata(:),edges);
s = stackedplot(diff(edges)+edges(1:end-1),N','DisplayLabels',compose('Cell #%d',1:length(sheets)));
  댓글 수: 2
Simon Chan
Simon Chan 2022년 3월 26일
You are right, histogram of cell counts

댓글을 달려면 로그인하십시오.


Find more on 2-D and 3-D Plots in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by