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.

 Réponse acceptée

Star Strider
Star Strider le 18 Mai 2014

0 votes

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 commentaires

Alain
Alain le 18 Mai 2014
I can't access your link, the contained is private...
Star Strider
Star Strider le 18 Mai 2014
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
Image Analyst
Image Analyst le 18 Mai 2014
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')
Image Analyst
Image Analyst le 18 Mai 2014
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.
Star Strider
Star Strider le 18 Mai 2014
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?
Image Analyst
Image Analyst le 19 Mai 2014
Yeah. Well at least they let me post here!
Star Strider
Star Strider le 19 Mai 2014
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!
Alain
Alain le 22 Mai 2014
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!
Star Strider
Star Strider le 22 Mai 2014
My pleasure!
Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by