File: hbars5.htm

package info (click to toggle)
ploticus-doc 2.40-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,604 kB
  • ctags: 159
  • sloc: pascal: 469; makefile: 63; sh: 11
file content (64 lines) | stat: -rw-r--r-- 1,618 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html><h1>hbars5</h1><img src="hbars5.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>

<pre><b>Usage: pl -gif hbars5.htm
Source: Understanding Global Issues No. 9 1998 
Values interpolated from graph in NI magazine May 99
<hr></b>

// <b> Specify data using <a href="../doc/getdata">proc getdata</a></b>
#proc getdata
data:
   // region      	1985   1995
  "Middle East"		17	8
  "Eastern Europe" 	12	8
  "North Africa"	7.5	4
  "Sub Saharan Africa"	3	1.5
  "North America"	5.5	3.5
  "Western Europe"	3	2.5
  "South Asia"		3.7	2.2
  "East Asia"		2.5	1.5
  "South America"	2	1.6

// <b> Define plotting area using <a href="../doc/areadef">proc areadef</a></b>
#proc areadef
  title: Military Expenditure as percent of GDP
  titledetails: adjust=-0.4,0 align=C
  rectangle: 2 1 4 3.5
  yrange: 0 10
  xrange: 0 20

// <b> Set up X axis using <a href="../doc/axis">proc axis</a></b>
#proc xaxis
  stubs: inc 5
  stubformat: %3.0f%%
  grid: color=gray(0.9)

// <b> Do Y axis using <a href="../doc/axis">proc axis</a></b>
#proc yaxis:
  stubs: datafields 1
  tics: none
  axisline: none

// <b> Do orange bars using <a href="../doc/bars">proc bars</a></b>
#proc bars
  horizontalbars: yes
  color: redorange
  lenfield: 2
  cluster: 1 / 2
  barwidth: 0.08
  legendlabel: 1985

// <b> Do blue bars using <a href="../doc/bars">proc bars</a></b>
#proc bars
  horizontalbars: yes
  // color: powderblue
  color: yellow
  lenfield: 3
  cluster: 2 / 2
  barwidth: 0.08
  legendlabel: 1995
	
// <b> Do legend using <a href="../doc/legend">proc legend</a></b>
#proc legend
  location: max-0.6 min+0.5