source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/PLOTS/DESSINE/bar_plot.html @ 97

Last change on this file since 97 was 97, checked in by pinsard, 18 years ago

start to modify headers of Obsolete *.pro files for better idldoc output

File size: 12.1 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>bar_plot.pro (IDLdoc API documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../../../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../../../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="bar_plot.pro (IDLdoc API documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>IDLdoc API documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../../../overview.html?format=raw" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../../../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../../../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../../../search-page.html?format=raw" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td >Source</td>
58     
59
60     
61      <td><a href="./../../../idldoc-help.html?format=raw" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74&lt;&lt; prev file | <a href="plt.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="bar_plot.html" target="_TOP">view single page</a> | <a href="./../../../index.html?format=raw" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html?format=raw">ToBeReviewed/PLOTS/DESSINE/</a></h1>
82      <h2 class="pro_file">bar_plot.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments"></div>
90
91     
92
93     
94
95     
96
97     
98
99      <div id="routine_details">
100       
101
102        <div class="routine_details" id="_bar_plot">
103
104          <h2><a class="top" href="#container">top</a>bar_plot </h2>
105       
106          <p class="header">
107            bar_plot<span class="result">, <a href="#_bar_plot_param_values">values</a></span>, <a href="#_bar_plot_keyword_baselines">baselines</a>=<span class="result">baselines</span>, <a href="#_bar_plot_keyword_colors">colors</a>=<span class="result">colors</span>, <a href="#_bar_plot_keyword_barnames">barnames</a>=<span class="result">barnames</span>, <a href="#_bar_plot_keyword_title">title</a>=<span class="result">title</span>, <a href="#_bar_plot_keyword_xtitle">xtitle</a>=<span class="result">xtitle</span>, <a href="#_bar_plot_keyword_ytitle">ytitle</a>=<span class="result">ytitle</span>, <a href="#_bar_plot_keyword_baserange">baserange</a>=<span class="result">baserange</span>, <a href="#_bar_plot_keyword_barwidth">barwidth</a>=<span class="result">barwidth</span>, <a href="#_bar_plot_keyword_barspace">barspace</a>=<span class="result">barspace</span>, <a href="#_bar_plot_keyword_baroffset">baroffset</a>=<span class="result">baroffset</span>, <a href="#_bar_plot_keyword_outline">outline</a>=<span class="result">outline</span>, <a href="#_bar_plot_keyword_overplot">overplot</a>=<span class="result">overplot</span>, <a href="#_bar_plot_keyword_background">background</a>=<span class="result">background</span>, <a href="#_bar_plot_keyword_rotate">rotate</a>=<span class="result">rotate</span>, <a href="#_bar_plot_keyword__EXTRA">_EXTRA</a>=<span class="result">_EXTRA</span></p>
108       
109          <div class="comments">
110 PURPOSE:
111        Create a bar graph, or overplot on an existing one.
112
113 CATEGORY:
114        Graphics.
115
116 CALLING SEQUENCE:
117        BAR_PLOT, Values
118
119 INPUTS:
120        Values: A vector containing the values to be represented by the bars.
121                Each element in VALUES corresponds to a single bar in the
122                output.
123
124 KEYWORD PARAMETERS:
125   BASELINES:   A vector, the same size as VALUES, that contains the
126                base value associated with each bar.  If not specified,
127                a base value of zero is used for all bars.
128
129      COLORS:   A vector, the same size as VALUES, containing the color index
130                to be used for each bar.  If not specified, the colors are
131                selected based on spacing the color indices as widely as
132                possible within the available colors (specified by D.N_COLORS).
133
134    BARNAMES:   A string array, containing one string label per bar.
135                If the bars are vertical, the labels are placed beneath
136                them.  If horizontal (rotated) bars are specified, the labels
137                are placed to the left of the bars.
138
139        TITLE:  A string containing the main title to for the bar plot.
140
141        XTITLE: A string containing the title for the X axis.
142
143        YTITLE: A string containing the title for the Y axis.
144
145   BASERANGE:   A floating-point scalar in the range 0.0 to 1.0, that
146                determines the fraction of the total available plotting area
147                (in the direction perpendicular to the bars) to be used.
148                If not specified, the full available area is used.
149
150    BARWIDTH:   A floating-point value that specifies the width of the bars
151                in units of "nominal bar width".  The nominal bar width is
152                computed so that all the bars (and the space between them,
153                set by default to 20% of the width of the bars) will fill the
154                available space (optionally controlled with the BASERANGE
155                keyword).
156
157    BARSPACE:   A scalar that specifies, in units of "nominal bar width",
158                the spacing between bars.  For example, if BARSPACE is 1.0,
159                then all bars will have one bar-width of space between them.
160                If not specified, the bars are spaced apart by 20% of the bar
161                width.
162
163   BAROFFSET:   A scalar that specifies the offset to be applied to the
164                first bar, in units of "nominal bar width".  This keyword
165                allows, for example, different groups of bars to be overplotted
166                on the same graph.  If not specified, the default offset is
167                equal to BARSPACE.
168
169     OUTLINE:   If set, this keyword specifies that an outline should be
170                drawn around each bar.
171
172    OVERPLOT:   If set, this keyword specifies that the bar plot should be
173                overplotted on an existing graph.
174
175  BACKGROUND:   A scalar that specifies the color index to be used for
176                the background color.  By default, the normal IDL background
177                color is used.
178
179        ROTATE: If set, this keyword indicates that horizontal rather than
180                vertical bars should be drawn.  The bases of horizontal bars
181                are on the left, "Y" axis and the bars extend to the right.
182
183 OUTPUTS:
184        A bar plot is created, or an existing one is overplotted.
185
186 EXAMPLE:
187        By using the overplotting capability, it is relatively easy to create
188        stacked bar charts, or different groups of bars on the same graph.
189
190        For example, if ARRAY is a two-dimensional array of 5 columns and 8
191        rows, it is natural to make a plot with 5 bars, each of which is a
192        "stacked" composite of 8 sections.  First, create a 2D COLORS array,
193        equal in size to ARRAY, that has identical color index values across
194        each row to ensure that the same item is represented by the same color
195        in all bars.
196
197        With ARRAYS and COLORS defined, the following code fragment
198        illustrates the creation of stacked bars (note that the number of rows
199        and columns is arbitrary):
200
201        !Y.RANGE = [0,ymax] ; Scale range to accommodate the total bar lengths.
202        BASE = INTARR(NROWS)
203        FOR I = 0, NROWS-1 DO BEGIN
204           BAR_PLOT, ARRAY(*,I), COLORS=COLORS(*,I), BASELINES=BASE, $
205                     BARWIDTH=0.75, BARSPACE=0.25, OVER=(I GT 0)
206           BASE = BASE + ARRAY(*,I)
207        ENDFOR
208
209        To plot each row of ARRAY as a clustered group of bars within the same
210        graph, use the BASERANGE keyword to restrict the available plotting
211        region for each set of bars.  The sample code fragment below
212        illustrates this method:
213
214        FOR I = 0, NROWS-1 DO $
215           BAR_PLOT, ARRAY(*,I), COLORS=COLORVECT, BARWIDTH=0.8,BARSPACE=0.2, $
216             BAROFFSET=I*((1.0+BARSPACE)*NCOLS), OVER=(I GT 0), BASERANGE=0.19
217
218        where NCOLS is the number of columns in ARRAY, and COLORVECT is a
219        vector containing the color indices to be used for each group of
220        bars.  (In this example, each group uses the same set of colors, but
221        this could easily be changed.)
222
223 MODIFICATION HISTORY:
224        August 1990, T.J. Armitage, RSI, initial programming.  Replacement
225        for PLOTBAR and OPLOTBAR routines written by William Thompson.
226
227        September 1990, Steve Richards, RSI, changed defaults to improve the
228        appearance of the bar plots in the default mode. Included
229        spacing the bars slightly.</div>
230
231         
232
233         
234            <h3>Parameters</h3>
235       
236           
237            <h4 id="_bar_plot_param_values">values&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
238             
239             
240             
241             
242             
243             
244             
245             
246            </h4>
247       
248          <div class="comments"></div>
249           
250
251         
252
253         
254
255            <h3>Keywords</h3>
256           
257            <h4 id="_bar_plot_keyword_baselines">baselines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
258             
259             
260             
261             
262             
263             
264             
265             
266            </h4>
267       
268            <div class="comments"></div>
269           
270            <h4 id="_bar_plot_keyword_colors">colors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
271             
272             
273             
274             
275             
276             
277             
278             
279            </h4>
280       
281            <div class="comments"></div>
282           
283            <h4 id="_bar_plot_keyword_barnames">barnames&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
284             
285             
286             
287             
288             
289             
290             
291             
292            </h4>
293       
294            <div class="comments"></div>
295           
296            <h4 id="_bar_plot_keyword_title">title&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
297             
298             
299             
300             
301             
302             
303             
304             
305            </h4>
306       
307            <div class="comments"></div>
308           
309            <h4 id="_bar_plot_keyword_xtitle">xtitle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
310             
311             
312             
313             
314             
315             
316             
317             
318            </h4>
319       
320            <div class="comments"></div>
321           
322            <h4 id="_bar_plot_keyword_ytitle">ytitle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
323             
324             
325             
326             
327             
328             
329             
330             
331            </h4>
332       
333            <div class="comments"></div>
334           
335            <h4 id="_bar_plot_keyword_baserange">baserange&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
336             
337             
338             
339             
340             
341             
342             
343             
344            </h4>
345       
346            <div class="comments"></div>
347           
348            <h4 id="_bar_plot_keyword_barwidth">barwidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
349             
350             
351             
352             
353             
354             
355             
356             
357            </h4>
358       
359            <div class="comments"></div>
360           
361            <h4 id="_bar_plot_keyword_barspace">barspace&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
362             
363             
364             
365             
366             
367             
368             
369             
370            </h4>
371       
372            <div class="comments"></div>
373           
374            <h4 id="_bar_plot_keyword_baroffset">baroffset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
375             
376             
377             
378             
379             
380             
381             
382             
383            </h4>
384       
385            <div class="comments"></div>
386           
387            <h4 id="_bar_plot_keyword_outline">outline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
388             
389             
390             
391             
392             
393             
394             
395             
396            </h4>
397       
398            <div class="comments"></div>
399           
400            <h4 id="_bar_plot_keyword_overplot">overplot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
401             
402             
403             
404             
405             
406             
407             
408             
409            </h4>
410       
411            <div class="comments"></div>
412           
413            <h4 id="_bar_plot_keyword_background">background&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
414             
415             
416             
417             
418             
419             
420             
421             
422            </h4>
423       
424            <div class="comments"></div>
425           
426            <h4 id="_bar_plot_keyword_rotate">rotate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
427             
428             
429             
430             
431             
432             
433             
434             
435            </h4>
436       
437            <div class="comments"></div>
438           
439            <h4 id="_bar_plot_keyword__EXTRA">_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
440             
441             
442             
443             
444             
445             
446             
447             
448            </h4>
449       
450            <div class="comments"></div>
451           
452         
453
454         
455         
456         
457         
458         
459         
460         
461         
462         
463         
464         
465         
466       
467         
468         
469         
470         
471         
472         
473         
474       
475         
476       
477        </div>
478       
479      </div>
480
481     
482
483      <div id="tagline">Produced by IDLdoc 2.0.</div>
484
485    </div>
486
487  </body>
488</html>
Note: See TracBrowser for help on using the repository browser.