01.02.2014 Views

GNUPlot Manual

GNUPlot Manual

GNUPlot Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

36 SET-SHOW gnuplot 4.0 97<br />

36.57.6.5 Candlesticks The candlesticks style can be used for 2-d data plotting of financial data<br />

or for generating box-and-whisker plots of statistical data. Five columns of data are required; in order,<br />

these should be the x coordinate (most likely a date) and the opening, low, high, and closing prices.<br />

The symbol is a rectangular box, centered horizontally at the x coordinate and limited vertically by the<br />

opening and closing prices. A vertical line segment at the x coordinate extends up from the top of the<br />

rectangle to the high price and another down to the low. The vertical line will be unchanged if the low<br />

and high prices are interchanged.<br />

The width of the rectangle can be controlled by the set boxwidth command. For backwards compatibility<br />

with earlier gnuplot versions, when the boxwidth parameter has not been set then the width of<br />

the candlestick rectangle is controlled by set bars .<br />

By default the rectangle is empty if (open > close), and filled with three vertical bars if (close > open).<br />

If filled-boxes support is present, then the rectangle is colored according to set style fill .<br />

See set bars (p. 55) and financebars (p. 97). See also<br />

finance demos.<br />

Note: To place additional symbols, such as the median value, on a box-and-whisker plot requires additional<br />

plot commands as in this example:<br />

# Data columns: X Min 1stQuartile Median 3rdQuartile Max<br />

set bars 4.0<br />

set style fill empty<br />

plot ’stat.dat’ using 1:3:2:6:5 with candlesticks title ’Quartiles’, \<br />

’’ using 1:4:4:4:4 with candlesticks lt -1 notitle<br />

See ‘set boxwidth‘, ‘set bars‘ and ‘set style fill‘.<br />

36.57.6.6 Dots The dots style plots a tiny dot at each point; this is useful for scatter plots with<br />

many points.<br />

36.57.6.7 Financebars The financebars style is only relevant for 2-d data plotting of financial<br />

data. Five columns of data are required; in order, these should be the x coordinate (most likely a date)<br />

and the opening, low, high, and closing prices. The symbol is a vertical line segment, located horizontally<br />

at the x coordinate and limited vertically by the high and low prices. A horizontal tic on the left marks<br />

the opening price and one on the right marks the closing price. The length of these tics may be changed<br />

by set bars. The symbol will be unchanged if the high and low prices are interchanged. See set bars<br />

(p. 55) and candlesticks (p. 97), and also the<br />

finance demo.<br />

36.57.6.8 Fsteps The fsteps style is only relevant to 2-d plotting. It connects consecutive points<br />

with two line segments: the first from (x1,y1) to (x1,y2) and the second from (x1,y2) to (x2,y2). See<br />

also<br />

steps demo.<br />

36.57.6.9 Histeps The histeps style is only relevant to 2-d plotting. It is intended for plotting<br />

histograms. Y-values are assumed to be centered at the x-values; the point at x1 is represented as<br />

a horizontal line from ((x0+x1)/2,y1) to ((x1+x2)/2,y1). The lines representing the end points are<br />

extended so that the step is centered on at x. Adjacent points are connected by a vertical line at their<br />

average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).<br />

If autoscale is in effect, it selects the xrange from the data rather than the steps, so the end points will<br />

appear only half as wide as the others. See also<br />

steps demo.<br />

histeps is only a plotting style; gnuplot does not have the ability to create bins and determine their<br />

population from some data set.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!