Debian Codegraph @

pltestsuite/stock2.htm

raw symbols SCIP
1 <html><h1>stock2</h1><img src="stock2.gif"><p>
2 <a href="gall.using.html">How to download and try this example</a><br>
3
4 <pre><b>Usage: pl -gif stock2.htm
5 Data source: quote.yahoo.com (Spreadsheet format)
6
7 Illustrates use of segment bars, and tics on bars to show opening and
8 closing price. Also illustrates ranging of data using the $inrange() function.
9 <hr></b>
10
11 #proc page
12 #if @DEVICE in gif,png
13 scale: 0.7
14 #endif
15
16 //<b> define top plotting area using <a href="../doc/areadef.html">proc areadef</a></b>
17 #proc areadef
18 title: Trailer Tongue Technologies Corp.
19 rectangle: 1 3 5 5
20 xscaletype: date dd-mmm-yy
21 xrange: 4-Apr-99 1-Jun-99
22 yrange: 50 60
23 yscaletype: log
24 #saveas: A
25
26 //<b> read data file using <a href="../doc/getdata.html">proc getdata</a></b>
27 #proc getdata
28 file: stock.csv
29 select: $inrange(@@1,X) = 1
30 delimit: comma
31
32 //<b> reverse the record order, since the data is provided in reverse chronological
33 // order, using <a href="../doc/transform.html">proc processdata</a></b>
34 #proc processdata
35 action: reverse
36
37 //<b> set up X axis using <a href="../doc/xaxis.html">proc xaxis</a></b>
38 #proc xaxis
39 stubs: inc 7
40 stubformat: Mmmdd
41 stubrange: 4-Apr-99
42 grid: color=skyblue
43 #saveas: XAX
44
45 //<b> set up Y axis using <a href="../doc/yaxis.html">proc yaxis</a></b>
46 #proc yaxis
47 stubs: inc 2
48 grid: color=skyblue
49
50 //<b> draw hi/low/close bars using <a href="../doc/bars.html">proc bars</a></b>
51 #proc bars
52 locfield: 1
53 segmentfields: 3 4
54 leftticfield: 2
55 rightticfield: 5
56 thinbarline: width=0.3 color=green
57
58 // do volume
59
60 //<b> define bottom plotting area using <a href="../doc/areadef.html">proc areadef</a></b>
61 #proc areadef
62 #clone: A
63 rectangle: 1 1.6 5 2.6
64 yrange: 0 5000000
65 yscaletype: linear
66 title:
67
68 //<b> set up X axis using <a href="../doc/xaxis.html">proc xaxis</a></b>
69 #proc xaxis
70 label: Volume (1000s)
71 ticincrement: 7
72 labeldetails: adjust=0,0.2 size=8
73
74 //<b> set up Y axis using <a href="../doc/yaxis.html">proc yaxis</a></b>
75 #proc yaxis
76 stubs: inc 1000 1000
77 grid: color=skyblue
78
79 //<b> render histogram using <a href="../doc/bars.html">proc bars</a></b>
80 #proc bars
81 barwidth: 0.001
82 locfield: 1
83 lenfield: 6
84 thinbarline: color=green