You need to plot them separately (but on the same axes):
bar(1:6,y(1:6),'k')
hold on
bar(7:numel(y),y(7:end),'b')
set(gca,'xtick',1:numel(y))
More Related Contents:
- How should I update the data of a plot in Matlab?
- Change color of 2D plot line depending on 3rd value
- Plotting logarithmic values in separate graphs [closed]
- How to interpolate with MATLAB 3D usind scatteredinterpolant plot? [closed]
- How can I convert an RGB image to grayscale but keep one color?
- MATLAB, Filling in the area between two sets of data, lines in one figure
- Plotting volumetric data in MATLAB
- How to normalize a histogram in MATLAB?
- How can I plot a function with two variables in Octave or Matlab?
- Automatically plot different colored lines
- Plot a plane based on a normal vector and a point in Matlab or matplotlib
- Suppress exponential formatting in figure ticks
- Printing a MATLAB plot in exact dimensions on paper
- How to draw an arrow in Matlab?
- fast 2dimensional histograming in matlab
- Attempt to execute script as a function
- How to plot a circle in Matlab?
- How to draw horizontal and vertical lines in MATLAB?
- How to show legend for only a specific subset of curves in the plotting?
- How can I plot a 3D-plane in Matlab?
- Plotting Implicit Algebraic equations in MATLAB
- Plot inside a loop in MATLAB
- Real time plot in MATLAB
- Producing subplots and then combine them into a figure later in MATLAB
- How do you use the LaTeX blackboard font in MATLAB?
- Turn a MATLAB plot into image
- Control colorbar scale in MATLAB
- How to control the margin size around subplots?
- Save Matlab invisible plot under terminal as an image with same size
- Remove xticks but keep xticklabels in MATLAB