title: Representing bars with different colors in matlab
body: <p>i have a bar graph having three bars as follows</p>
  
  <pre><code>x=[0.22,0.34,0.42]
  bar(x,0.1,'stacked')
  somenames={'IND Relation' ; 'DIS Relation' ; 'EQ Relation'}
  set(gca,'xticklabel',somenames)
  ylabel('F1')
  </code></pre>
  
  <p>all the three bars are in blue color but i want to represent <code>IND Relation</code> with Brown color, <code>DIS Relation</code> with green color and <code>EQ Relation</code> with blue color.</p>
  
  <p>following is the output, i only want to change colors in above order <code>brown</code> <code>green</code> and <code>blue</code></p>
  
  <p><img src="https://i.stack.imgur.com/Q1XS8.png" alt="enter image description here"></p>