How to make bins without hist?

Hello, I'm quite new with graphic coding, but I'm trying to do something not really difficult I hope:
A figure is better to understand what I want to do:
Each bin corresponds to one value in percent. The two groups corresponds to different cases. Each colour to one data: one value.
I don't think hist() will help me here. Does any one of you have any advices or suggestions or solutions?!
Thanks for your help.

 Accepted Answer

Star Strider
Star Strider on 18 May 2014
Use Stacked Bar Graphs to Show Contributing Amounts. I can’t be any more specific because I don’t know more about your application.

10 Comments

I can't access your link, the contained is private...
It’s MATLAB Online documentation. It should be freely available online. I don’t know what the problem could be.
It’s the 'stacked' option in bar.
Go here: Types of Bar Graphs, then scroll down to the 'stacked' option.
It’s also available in the MATLAB documentation for bar in Examples then Bar Graph Styles
Alain must have an account that is not linked to a specific license number.
That’s the first I heard of that sort of complication.
----------
FROM THE ONLINE DOCUMENTATION:
Create a 2x2 subplot with different styles applied to each bar graph.
Y = round(rand(5,3)*10);
figure;
subplot(2,2,1); bar(Y,'grouped'); title('Group')
subplot(2,2,2); bar(Y,'stacked'); title('Stack')
subplot(2,2,3); bar(Y,'histc'); title('Histc')
subplot(2,2,4); bar(Y,'hist'); title('Hist')
I have two accounts. The one under my real name and associated with my license, which can see the documentation, and one under Image Analyst which is not associated with my purchased license and I cannot see documentation when logged in that way, for some weird reason.
The operative concept being ‘weird’!.
I understand that TMW would want to protect its intellectual property, but hiding the documentation from other than licensed users with accounts associated with that license strikes me as being asymptotic to idiocy!
What better advertising exists than the documentation itself?
Yeah. Well at least they let me post here!
I post in the same account I use for everything else here. I never thought about using an alias account. That may be the reason they tolerate my presence!
Yes it is exactly the reason you said. But I just search 'bar matlab' in google and I found what wanted to give me! Thanks!
My pleasure!
Thanks!

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

on 18 May 2014

Commented:

on 22 May 2014

Community Treasure Hunt

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

Start Hunting!