How do I plot a histogram for large data sets?

Can anyone possibly help me with writing a code for my histogram?
I need to use matlab but I'm not familiar with histograms and the information page is not helping too much.
Essentially I have 355 data points, then the raw data for all those data points.
I want to plot Number of Cells against Fluorescence Intensity
x (Fluorescence Intensity)
y (Number of cells)
I can determine the directory and file name, but I do not know how to write the code to generate the histogram after that.
The data will be imported from an excel file, just FYI.

6 个评论

Can you clarify what you data format is? Do you mean to say that you have 355 data files of raw data? Do the files have headers? What are the dimensions of thes files? Also How do fluorescence intensity and number of cells relate to your data (i.e. is number of cels a column or row value)? What is the file extension of your data files? Is it .xls, .csv...? It would be really difficult to help you get started with writing a code without knowing things like the dimensions of your data, how it is organized, etc.
Also, a histogram essentially displays the number of occurences number ranges (bins) in a data set so you will always have some number ranges (bins) on the x-axis and the count (number of times that the data fell into each bin in the data set). So if you are looking to plot your x vs. y or something like that, a histogram is not the tool to be using.
I know i need a histogram, so any other plot is not useful thanks.
I have attached the data set.
There are 355 cells, so 355 readings for the plot.
It is an xls.
So far, this is what I have:
dataset = xlsread('histogram data for glucose.xlsx');
x = dataset(:,1);
y = dataset(:,2);
figure
Is this what you are looking for?figure.jpg
Yes!
Thank You, but i found a way to do it in imageJ.
This is actually not a histogram. It is a bar graph you are looking for.
Then it wasn’t what I was looking for

请先登录,再进行评论。

回答(1 个)

The basic difference between histogram and bar chart is:
Histogram refers to a graphical representation; that displays data by way of bars to show the frequency of numerical data. A bar graph is a pictorial representation of data that uses bars to compare different categories of data.
A Bar chart is apt for your problem. This should work.
dataset = xlsread('histogram data for glucose.xlsx');
x = dataset(:,1);
y = dataset(:,2);
bar(x,y);

类别

帮助中心File Exchange 中查找有关 Data Distribution Plots 的更多信息

提问:

2019-6-12

评论:

2019-6-13

Community Treasure Hunt

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

Start Hunting!

Translated by