Two histograms with different x axis /values
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
1 Comment
Accepted Answer
0 votes

17 Comments


- Do you want both y values to be scaled to a common maximum height? Like each normalized independently like this last plot, or don't scale y and use the actual counts, like I did in my last comment?
- Do you want both histograms to have the same number of bins so that the bars overlap (except that the heights may differ)?
- Do you want the x axis to have the same values? But what if the data is not in the same range (like 1-100, and 0-2000)? Which x axis values would you want to display - the values from the first histogram or values from the second histogram?
- And I believe you'd need a legend, right?
- Do you want both y values to be scaled to a common maximum height? Like each normalized independently like this last plot, or don't scale y and use the actual counts, like I did in my last comment?
- Do you want both histograms to have the same number of bins so that the bars overlap (except that the heights may differ)?
- Do you want the x axis to have the same values? But what if the data is not in the same range (like 1-100, and 0-2000)? Which x axis values would you want to display - the values from the first histogram or values from the second histogram?
- And I believe you'd need a legend, right?


More Answers (1)
0 votes
Categories
Find more on Histograms in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)