Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab matrix bar graph with errors

  1. Feb 21, 2012 #1
    As in the title I have a matlab graph. Its a bar chart with two sets of data done in matrix form. When I try and put in error bars the way I'm used to they both go on but in the middle of the two sets of data. Any way I can make them appear over the actual bars? Any help greatly appreciated!!

    The code I have so far is:

    close all
    clear;
    clc

    Under = [ 5.46, 2.02, 1.17];
    Outside = [7.23, 3.99, 3.2];

    E = [1.162, 1.162, 1.162];

    data = [Under; Outside];

    Matrix = (data');

    %size (Matrix)

    figure (1);
    bar(Matrix); hold on
    errorbar(Under ,E, 'ks');
    errorbar(Outside, E, 'ks');

    ylabel('SNR');
    xlabel('Layers of tape');
    title('Optimised Settings');
     
  2. jcsd
  3. Feb 21, 2012 #2
    mistake post
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matlab matrix bar graph with errors
  1. Matlab Error (Replies: 1)

Loading...