Bar plot of categorical data
Show older comments
Hi!
I have a small column vector (46x1). Each row has a number (0-7), where each number encodes a specific electrode location. I want to create a bar plot essentially with the relative (or absolute) frequency of each number. Therefore something like this:

If if use the histogram() function, then it only plots a line connecting the dots

And if I use bar() function, then it plots each row individually.
Can you please help? thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Histograms 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!