Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6076005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:33:30+00:00 2026-05-23T10:33:30+00:00

I would like to produce a plot like the following in matlab. Or may

  • 0

I would like to produce a plot like the following in matlab.

enter image description here

Or may be something like this
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:33:31+00:00Added an answer on May 23, 2026 at 10:33 am

    You can use bar(…) or hist(…) to get the results you want. Consider the following code with results shown below:

    % Make some play data:
    x = randn(100,3);
    [y, b] = hist(x);
    
    % You can plot on your own bar chart:
    figure(82);
    bar(b,y, 'grouped');
    title('Grouped bar chart');
    
    % Bust histogram will work here:
    figure(44);
    hist(x);
    title('Histogram Automatically Grouping');
    
    % Consider stack for the other type:
    figure(83);
    bar(b,y,'stacked');
    title('Stacked bar chart');
    

    Group Bar Result
    Histogram Results
    Stacked Bar Result

    If your data is different sizes and you want to do histograms you could choose bins yourself to force hist(…) results to be the same size then plot the results stacked up in a matrix, as in:

    data1 = randn(100,1);       % data of one size
    data2 = randn(25, 1);       % data of another size!
    
    myBins = linspace(-3,3,10); % pick my own bin locations
    
    % Hists will be the same size because we set the bin locations:
    y1 = hist(data1, myBins);   
    y2 = hist(data2, myBins);
    
    % plot the results:
    figure(3);
    bar(myBins, [y1;y2]');
    title('Mixed size result');
    

    With the following results:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement in python something like this: def producer(): while True:
I would like to produce the following form style: Name Email [.................] [.................] Subject
This code produces a POST request: urllib2.urlopen(http://somedomain.com/, data) I would like to produce a
I would like to ask how to produce a plot similar to that in
I would like to produce a character list of all of the first letters
I would like to produce C# helper files from the KML2.2 xml schema using
I would like to produce a binary zip distribution of my project that would
I am using Core Image and would like to produce a black and white
I'm using Visual Studio 2008 (C++) and would like to produce a list of
I would like to be able to produce a file by running a command

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.