concept box in category gnuplot

appears as: boxes, box, boxes, box, The box
Gnuplot in Action

This is an excerpt from Manning's book Gnuplot in Action.

plot "marathon" using 1:2 with boxes

Both styles represent the maximum range (low to high) with a vertical line. They differ in the way the secondary (opening to closing) range is displayed: in the candlesticks style, a box of finite width is overlaid on the vertical line; in the financebars style, tic marks indicate the opening and closing values. The size of the tic marks is controlled by the set bars option familiar from errorbars styles (see figure 6.5).

You can control the details of the candlesticks style using some additional options. If the current fill style is empty and the closing value is less than the opening one, the box is filled with the current color; otherwise, the box is left empty. (If you choose a particular fill style using set style fill, then this style is used to fill the box, independent of the opening and closing values. See section 9.4.4 for more information on set style fill.)

You can change the width of the box either by using the set boxwidth option or by supplying a value in a sixth column. If the width is read from a column, it’s assumed to be given in the same units as the x coordinate. (If boxwidth is unset, the value of set bars is used instead, but this usage is deprecated for candlesticks. For finance-bars, the set bars option is the only way to change the size of the opening and closing markers.)

6.3.3. Styles with steps and boxes

Box styles, which draw a box of finite width, are sometimes useful for counting statistics or for other data sets where the x coordinates have only discrete values.

Figure 6.7. Box and impulse styles. The widths of boxes can be set globally or for each box individually. The second data set uses a fixed width (enclosed in parentheses in the using directive); the third one reads values for variable box widths from file.

If you supply a third column in the using directive, it’s interpreted as the total width of the box in the same coordinates that are used for the x axis. The set boxwidth option has the following syntax:

set boxwidth [ {flt:size} ] [ absolute | relative ]

The size parameter can either be a measure of the absolute size of the box in x axis coordinates or denote a fraction of the default box size, which is the width of the box if it touches adjacent boxes. If absolute mode isn’t stated explicitly, relative sizing is assumed. You can use a boxwidth of -2 to force automatic sizing of boxes (with adjacent boxes touching each other). The impulses style is similar to the boxes style with boxwidth set to zero. The examples in figure 6.7 clarify this.