creating a histogram in a specific way
Show older comments
hi, I want to make a histogram that gets a vector with values from the group (0 1 10 100, and creates a histogram that has one bin for each of those values and has the axis of x also sorted only for those values. I tried few things and nothing seems to work. I wand the bins in the same width.
Accepted Answer
More Answers (1)
Sean
on 14 Dec 2011
0 votes
Are you trying to bin on a log scale or are you trying to bin to arbitrary values?
If you are trying to do the first, you might try taking the log10() of all your input values and binning them linearly (i.e. less than 1 is negative, 1-9.9999 is is 0-1, 10-99.9999 is 1-2, etc.) You could round the values to fall into whichever bin you wanted.
1 Comment
Dr. Seis
on 14 Dec 2011
Agreed... and then holding the bin "width" the same would make more sense.
Categories
Find more on Data Distribution 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!