~ubuntu-branches/ubuntu/maverick/ploticus/maverick

« back to all changes in this revision

Viewing changes to prefabs/stack.pl

  • Committer: Bazaar Package Importer
  • Author(s): James W. Penny
  • Date: 2002-04-10 23:02:04 UTC
  • Revision ID: james.westby@ubuntu.com-20020410230204-64em4ns2f57c5u3l
Tags: 2.0.3-1
* The "That Tears it, Now You Have to Update Docs Package" Release.
* New upstream release (well, not so new :-( )   closes: Bug#137578
* Correct missing libpng2-dev in build-depends.  closes: Bug#142205
* Use correct syntax to:
* close URL type.                                closes: Bug#137577
* fix Architecture                               closes: Bug#141657
* close ITP                                      closes: Bug#132878

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ploticus data display engine.  Software, documentation, and examples.  
 
2
// Copyright 1998-2002 Stephen C. Grubb  (scg@jax.org).
 
3
// Covered by GPL; see the file 'Copyright' for details. 
 
4
// http://ploticus.sourceforge.net
 
5
 
 
6
//// STACK - do a stacked bar graph 
 
7
 
 
8
 
 
9
//// load stack-specific parms..
 
10
#setifnotgiven barwidth = ""
 
11
#setifnotgiven xnumeric = ""
 
12
#setifnotgiven y2 = ""
 
13
#setifnotgiven y3 = ""
 
14
#setifnotgiven y4 = ""
 
15
#setifnotgiven color = orange
 
16
#setifnotgiven color2 = "powderblue"
 
17
#setifnotgiven color3 = "dullyellow"
 
18
#setifnotgiven color4 = "drabgreen"
 
19
#setifnotgiven name = ""
 
20
#setifnotgiven name2 = ""
 
21
#setifnotgiven name3 = ""
 
22
#setifnotgiven name4 = ""
 
23
#setifnotgiven outline = no
 
24
#if @CM_UNITS = 1
 
25
  #setifnotgiven legend = "min+1.25 max+1.25"
 
26
#else
 
27
  #setifnotgiven legend = "min+0.5 max+0.5"
 
28
#endif
 
29
 
 
30
 
 
31
//// load standard parms..
 
32
#include $chunk_setstd
 
33
 
 
34
 
 
35
//// read data..
 
36
#include $chunk_read
 
37
 
 
38
 
 
39
//// plot area..
 
40
#include $chunk_area
 
41
#if @xnumeric = yes
 
42
  xautorange: datafield=@x incmult=2.0
 
43
#else
 
44
  xscaletype: categories
 
45
  xcategories: datafield=@x
 
46
#endif
 
47
#if @yrange = ""
 
48
  yautorange: datafields=@y,@y2,@y3,@y4 combomode=stack incmult=2.0 
 
49
#elseif @yrange = 0
 
50
  yautorange: datafields=@y,@y2,@y3,@y4 combomode=stack incmult=2.0 lowfix=0
 
51
#else
 
52
  yrange: @yrange
 
53
#endif
 
54
 
 
55
 
 
56
//// x axis..
 
57
#include $chunk_xaxis
 
58
stubcull: yes
 
59
#if @xnumeric = yes
 
60
  stubs: inc @xinc
 
61
#else
 
62
  stubs: usecategories
 
63
#endif
 
64
 
 
65
 
 
66
//// y axis..
 
67
#include $chunk_yaxis
 
68
stubcull: yes
 
69
 
 
70
 
 
71
//// title..
 
72
#include $chunk_title
 
73
 
 
74
 
 
75
//// user pre-plot include..
 
76
#if @include1 != ""
 
77
  #include @include1
 
78
#endif
 
79
 
 
80
 
 
81
//// do 1st level bars..
 
82
#proc bars
 
83
locfield: @x
 
84
lenfield: @y
 
85
color: @color
 
86
outline: @outline
 
87
#if @barwidth != ""
 
88
  barwidth: @barwidth
 
89
#endif
 
90
legendlabel: @name
 
91
 
 
92
//// 2nd level bars..
 
93
#if @y2 != ""
 
94
  #proc bars
 
95
  locfield: @x
 
96
  lenfield: @y2
 
97
  stackfields: *
 
98
  color: @color2
 
99
  outline: @outline
 
100
  #if @barwidth != ""
 
101
    barwidth: @barwidth
 
102
  #endif
 
103
  legendlabel: @name2
 
104
#endif
 
105
 
 
106
//// 3rd level bars..
 
107
#if @y3 != ""
 
108
  #proc bars
 
109
  locfield: @x
 
110
  lenfield: @y3
 
111
  stackfields: *
 
112
  color: @color3
 
113
  outline: @outline
 
114
  #if @barwidth != ""
 
115
    barwidth: @barwidth
 
116
  #endif
 
117
  legendlabel: @name3
 
118
#endif
 
119
 
 
120
//// 4th level bars..
 
121
#if @y4 != ""
 
122
  #proc bars
 
123
  locfield: @x
 
124
  lenfield: @y4
 
125
  stackfields: *
 
126
  color: @color4
 
127
  outline: @outline
 
128
  #if @barwidth != ""
 
129
    barwidth: @barwidth
 
130
  #endif
 
131
  legendlabel: @name4
 
132
#endif
 
133
 
 
134
//// legend..
 
135
#if @name != ""
 
136
#proc legend
 
137
location: @legend
 
138
#endif
 
139
 
 
140
//// user post-plot include..
 
141
#if @include2 != ""
 
142
  #include @include2
 
143
#endif