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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
.ig >>
<STYLE TYPE="text/css">
<!--
A:link{text-decoration:none}
A:visited{text-decoration:none}
A:active{text-decoration:none}
OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }
H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: script examples gallery - bar graphs / histograms</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
<table cellpadding=2 width=550><tr>
<td><br><h2>Script examples gallery - Bar graphs / histograms</h2></td>
<td align=right>
<small>
<a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
Version 2.33 Jun'06
</small><br><a href="../doc/scripthome.html">Scripts</a>
<td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>
.TH Script_examples_gallery_-_Bar_graphs_/_histograms PL "02-JUN-2006 PL ploticus.sourceforge.net"
.ig >>
<p>
This page contains a series of vertical bar graph examples
illustrating the available varieties and options.
These examples all use ploticus's <a href="../doc/bars.html">proc bars</a>,
which renders bar graphs, error bars, and bar segments, in vertical or horizontal
orientation. <a href="../doc/clickmap.html">Clickmaps</a> are supported
for bar graphs.
<br>
<h3>(See also the examples for
<a href="../doc/prefab_bars_ex.html">bars prefab</a>,
<a href="../doc/prefab_chron_ex.html">chron prefab</a>
and
<a href="../doc/prefab_dist_ex.html">dist prefab</a>.)
</h3>
<br>
<p>
<h3><br>Example 1</h3>
<a href="stock2.htm">stock2<br><img src="stock2.gif"></a>
<br>
A stock price/volume display. The bars show low-high range
for the day (<b>segmentfields</b> attribute), and have left tics to
show opening price, and right tics to show closing price.
<h3><br><br>Example 2</h3>
<a href="bars2.htm">bars2<br><img src="bars2.gif"></a>
<br>
In this example, values less than zero result in red downward bars.
The positive bars are done first using orange and then the negative bars
are done using red.
The values are displayed near the ends of the bars using the
<b>showvalues</b> option.
<h3><br><br>Example 3</h3>
<a href="hitcount.htm">hitcount<br><img src="hitcount.gif"></a>
<br>
A histogram example, which utilizes datetime scaling as well as
some of ploticus's data filtering / processing features.
<h3><br><br>Example 4</h3>
<a href="bars3.htm">bars3<br><img src="bars3.gif"></a>
<br>
Stacked bars. These show magnitude of several components as well
as the sum of the components.
<a href="../doc/bars.html">proc bars</a>
is executed four times, first to render bars for Steve, then for Lisa,
then for Rob, then for Takisha.
The <b>stackfield</b> attribute indicates what data field(s) should be used
to raise the bars. For a full-page version of this see
<a href="vermonth.htm">vermonth</a>.
Note: stacking cannot be used when components are a mixture of
positive and negative values.
<p>
<h3><br><br>Example 5</h3>
<a href="students.htm">students<br><img src="students.gif"></a>
<br>
This example allows a variable number of datafields, and the number
of bars per cluster (as well as the legend) follows the number of datafields on input.
<h3><br><br>Example 6</h3>
<a href="bars5a.htm">bars5a<br><img src="bars5a.gif"></a>
<br>
Stacked, clustered bars.
These may be useful in displaying multiple variables, groupings, and instances.
<a href="../doc/bars.html">proc bars</a>
is executed once for each color of bar, using
the <b>stackfield</b> and <b>cluster</b> attributes to control position.
<a href="bars5.htm">bars5</a> is another example of stack clustered bars.</a>
<br>
<br>
<br>
<h3>Example 7</h3>
<a href="snpmap1.htm">snpmap1<br><img src="snpmap1.gif"></a>
<br>
This example used
<a href="../doc/scatterplot.html">proc scatterplot</a> to generate the bars
rather than proc bars. Proc scatterplot
can cluster points to string them upward to form little
bars. This is a convenient way to show multi-tiered
frequency distributions. The multiple colors are achieved by overlaying
several subgroups of data of diminishing size.
<br>
<br>
<a name=proportion></a>
<h3><br><br>Example 8</h3>
<a href="propbars2.htm">propbars2<br><img src="propbars2.gif"></a>
<br>
Here, the bar segments represent proportions of a whole.
The <b>stackfields</b> attribute is used to position bars.
See also <a href="propbars1.htm">propbars1</a>, a horizontal example
of proportional bars.
<h3><br><br>Examples of bar labeling</h3>
<a href="bars6.htm">bars6<br><img src="bars6.gif"></a>
<br>
Here, bar labels
are formatted using the <b>labelword</b> attribute
to show dollar amounts.
<br><br>
<a href="bars7.htm">bars7<br><img src="bars7.gif"></a>
<br>
Longwise labels, formatted to show dollar amounts.
<br><br>
<a href="bars8.htm">bars8<br><img src="bars8.gif"></a>
<br>
Individual components of a stacked bar graph
labeled with values. Label position is adjusted downward
so that label is within bar, and a lighter-colored backing box is
used so that the labels are visible.
.>>
.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>
<br>
<center>
Ploticus is hosted at http://ploticus.sourceforge.net <br>
<img src="http://sourceforge.net/sflogo.php?group_id=38453" width="88" height="31" border="0" alt="SourceForge Logo">
</center>
.>>
|