Octave graphic add-on, Octplot


1.4 Basic graphs III - bar, barh

Function files: h = bar (x,y,WIDTH,COLOR), h = barh (x,y,WIDTH,COLOR)

These functions plots bar graph, function barh plots bar horizontaly. Parameters x, WIDTH, COLOR are optional.

Using parameters:
bar(y) - parameter x starts automatically at value 1 and for next y are increase of 1
bar(x,y) - x describe position of column on coordinate x and high of bar describe y; x,y must be the same length
bar(x,y,width) - width of columns, default is 0,8
bar(x,y,ColorSpec) - color of columns, it is possible to choose one of basic colors: "r", "g", "b", "c", "m", "y", "k", "w"
bar(x,y,[r g b]) - color of columns based on component rgb; about colors see in section Octaviz - 1.2 Arrows in verge - function vtk_arrows3

barh(x,exp(-x.*x),0.5,[0.4 0.3 0.9])

<<< 1.3 Basic graphs II - area, line, stem 1.5 Contour plot >>>

© 2008 David Prokop