<html><h1>stock2</h1><img src="stock2.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>

<pre><b>Usage: pl -gif stock2.htm
Data source: quote.yahoo.com (Spreadsheet format)

Illustrates use of segment bars, and tics on bars to show opening and
closing price.  Also illustrates ranging of data using the $inrange() function.
<hr></b>

#proc page
#if @DEVICE in gif,png
  scale: 0.7
#endif

//<b> define top plotting area using <a href="../doc/areadef.html">proc areadef</a></b>
#proc areadef
title: Trailer Tongue Technologies Corp.
rectangle: 1 3 5 5
xscaletype: date dd-mmm-yy
xrange: 4-Apr-99 1-Jun-99
yrange: 50 60
yscaletype: log
#saveas: A

//<b> read data file using <a href="../doc/getdata.html">proc getdata</a></b>
#proc getdata
file: stock.csv
select: $inrange(@@1,X) = 1
delimit: comma

//<b> reverse the record order, since the data is provided in reverse chronological
// order, using <a href="../doc/transform.html">proc processdata</a></b>
#proc processdata
action: reverse

//<b> set up X axis using <a href="../doc/xaxis.html">proc xaxis</a></b>
#proc xaxis
stubs: inc 7
stubformat: Mmmdd
stubrange: 4-Apr-99
grid: color=skyblue
#saveas: XAX

//<b> set up Y axis using <a href="../doc/yaxis.html">proc yaxis</a></b>
#proc yaxis
stubs: inc 2
grid: color=skyblue

//<b> draw hi/low/close bars using <a href="../doc/bars.html">proc bars</a></b>
#proc bars
locfield: 1
segmentfields: 3 4	// low and hi
leftticfield: 2		// open
rightticfield: 5	// close
thinbarline: width=0.3 color=green

// do volume

//<b> define bottom plotting area using <a href="../doc/areadef.html">proc areadef</a></b>
#proc areadef
#clone: A
rectangle: 1 1.6 5 2.6
yrange: 0 5000000
yscaletype: linear
title:

//<b> set up X axis using <a href="../doc/xaxis.html">proc xaxis</a></b>
#proc xaxis
label: Volume (1000s)
ticincrement: 7 
labeldetails: adjust=0,0.2 size=8

//<b> set up Y axis using <a href="../doc/yaxis.html">proc yaxis</a></b>
#proc yaxis
stubs: inc 1000 1000
grid: color=skyblue

//<b> render histogram using <a href="../doc/bars.html">proc bars</a></b>
#proc bars
barwidth: 0.001
locfield: 1
lenfield: 6
thinbarline: color=green


syntax highlighted by Code2HTML, v. 0.9.1