Credits Overview Plotting Styles Commands Terminals

2D boxes

plot with boxes uses 2 or 3 columns of basic data. Additional input columns may be used to provide information such as variable line or fill color. See rgbcolor variable.

     2 columns:  x  y
     3 columns:  x  y  x_width

figure_boxes

The width of the box is obtained in one of three ways. If the input data has a third column, this will be used to set the box width. Otherwise if a width has been set using the set boxwidth command, this will be used. If neither of these is available, the width of each box will be calculated so that it touches the adjacent boxes.

The box interiors are drawn using the current fillstyle. Alternatively a fillstyle may be specified in the plot command. See set style fill. If no fillcolor is given in the plot command, the current line color is used.

Examples:

To plot a data file with solid filled boxes with a small vertical space separating them (bargraph):

      set boxwidth 0.9 relative
      set style fill solid 1.0
      plot 'file.dat' with boxes

To plot a sine and a cosine curve in pattern-filled boxes style with explicit fill color:

      set style fill pattern
      plot sin(x) with boxes fc 'blue', cos(x) with boxes fc 'gold'

The sin plot will use pattern 0; the cos plot will use pattern 1. Any additional plots would cycle through the patterns supported by the terminal driver.