next up previous contents index
Next: Boxxyerrorbars Up: Set style rectangle Previous: Boxerrorbars   Contents   Index


Boxes

The boxes style is only relevant to 2-d plotting. It draws a box centered about the given x coordinate from the x axis (not the graph border) to the given y coordinate. The width of the box is obtained in one of three ways. If it is a data plot and the data file has a third column, this will be used to set the width of the box. If not, 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 automatically so that it touches the adjacent boxes.

The interior of the boxes is drawn according to the current fillstyle. See set style fill (p. [*]) for details. Alternatively a new fillstyle may be specified in the plot command.

For fillstyle empty the box is filled with the background color.

For fillstyle solid the box is filled with a solid rectangle of the current drawing color. There is an optional parameter 5#5density6#6 that controls the fill density; it runs from 0 (background color) to 1 (current drawing color).

For fillstyle pattern the box is filled in the current drawing color with a pattern, if supported by the terminal driver.

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:


     set style fill pattern
     plot sin(x) with boxes, cos(x) with boxes

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.

To specify explicit fillstyles for each dataset:


    plot 'file1' with boxes fs solid 0.25, \
         'file2' with boxes fs solid 0.50, \
         'file3' with boxes fs solid 0.75, \
         'file4' with boxes fill pattern 1, \
         'file5' with boxes fill empty

Currently only the following terminal drivers support fillstyles other than empty: x11, windows, pm, wxt, postscript, fig, pbm, png, gif, hpdj, hppj, hpljii, hp500c, jpeg, nec_cp6, epson_180dpi, epson_60dpi, epson_lx800, okidata, starc and tandy_60dpi. The BeOS driver (be) is untested.


next up previous contents index
Next: Boxxyerrorbars Up: Set style rectangle Previous: Boxerrorbars   Contents   Index
Ethan Merritt 2007-03-03