Bar plots

### 19.1.14 Bar plots

The bar_plot or barplot command draws bar plots.

- bar_plot takes one mandatory argument and one optional argument:
  - M, a matrix, where each row consists of a label followed by one or more values. If the labels are followed by more than one value, then the first row needs to be identifiers.
  - color=col, where col is a color object or a list of color objects (see Section 18.1.3). By default, col=black.
- bar_plot(M ⟨,color=col ⟩) draws a bar graph with a bar for each label, whose height is given by the corresponding value. If the matrix has more than two columns, then there will be a bar plot for each column of values. If col is a color object, then the bars are filled with the specified color. If col is a list of colors, then the fill color cycles through the list for bars from left to right (each group of bars is colored by using the same colors).

#### Examples

bar_plot([["France",6],["Germany",12],["Switzerland",5]],color=navy)

bar_plot([[2,"*First group*","*Second group*"], ["A",2,5],["B",5,6],["C",6,6]],color=[teal,olive,gold])