Debian Codegraph @

pltestsuite/propbars1.htm

raw symbols SCIP
1 <html><h1>propbars1</h1><img src="propbars1.gif"><p>
2 <a href="gall.using.html">How to download and try this example</a><br>
3
4 <pre><b>Usage: pl -gif propbars1.htm
5 Source: Artemis Simopoulos, "The Omega Plan"
6 (Values interpreted from another graph and may not be exact)
7 <hr></b>
8
9 // <b> specify the data using <a href="../doc/getdata.html">proc getdata</a></b>
10 // Each value is an individual percentage.
11
12 #proc page
13 landscape: yes
14
15 #proc getdata
16 // oil lin alph mono sat
17 data: Canola 22 10 63 5
18 Flaxseed 17 46 29 8
19 Olive 6 2 80 12
20 Walnut 62 8 20 10
21 Coconut 3 0 20 77
22 Corn 62 1 23 14
23 Safflower 78 0 12 10
24
25 // <b> define plotting area using <a href="../doc/areadef.html">proc areadef</a></b>
26 #proc areadef
27 title: Fats content of various oils
28 rectangle: 1 1 4 2.7
29 xrange: 0 100
30 yrange: 0 8
31
32 // <b> do y axis stubs (oil names) using <a href="../doc/axis.html">proc yaxis</a></b>
33 #proc yaxis
34 stubs: datafields 1
35 grid: color=powderblue
36 axisline: none
37 tics: no
38
39 // <b> do x axis stubs (percents) using <a href="../doc/axis.html">proc xaxis</a></b>
40 #proc xaxis
41 stubs: inc 20
42 stubformat: %3.0f%%
43
44 // <b> do light green bars using <a href="../doc/bars.html">proc bars</a></b>
45 #proc bars
46 horizontalbars: yes
47 barwidth: 0.13
48 lenfield: 2
49 color: rgb(.6,.85,.8)
50 outline: no
51 legendlabel: Linolenic (omega-6)
52 #saveas: B
53
54 // <b> do dark green bars </b>
55 // Use stackfields to position bars beyond the first set of bars
56 #proc bars
57 #clone B
58 lenfield: 3
59 stackfields: 2
60 legendlabel: Alpha-Linolenic (omega-3)
61 color: teal
62
63 // <b> do pink bars </b>
64 // Use stackfields to position bars beyond the first two sets of bars
65 #proc bars
66 #clone B
67 lenfield: 4
68 stackfields: 2 3
69 legendlabel: Monounsaturated fats
70 color: pink
71
72 // <b> do red bars </b>
73 // Use stackfields to position bars beyond the first three sets of bars
74 #proc bars
75 #clone B
76 lenfield: 5
77 stackfields: 2 3 4
78 legendlabel: Saturated fats
79 color: red
80
81 // <b> do legend (1st column) using <a href="../doc/legend.html">proc legend</a></b>
82 // the noclear attribute must be specified otherwise the entries are removed
83 // we need to keep them for the 2nd invocation, below..
84 #proc legend
85 location: min+0.2 min-0.3
86 noclear: yes
87 specifyorder: Lin
88 alpha
89
90 // <b> do legend (2nd column) using <a href="../doc/legend.html">proc legend</a></b>
91 #proc legend
92 location: min+2.4 min-0.3
93 specifyorder: Mono
94 Satu