source: trunk/SRC/ToBeReviewed/PLOTS/DESSINE/sbar_plot.pro @ 327

Last change on this file since 327 was 327, checked in by pinsard, 17 years ago

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1;+
2;
3; @file_comments
4; Same thing that bar_plot but compatible with the whole environment (common.pro included)
5;
6; @categories Graphics
7;
8; @keyword COLORS {type=vector}
9; A vector, the same size as VALUES, containing the color index
10; to be used for each bar.  If not specified, the colors are
11; selected based on spacing the color indices as widely as
12; possible within the available colors (specified by D.N_COLORS).
13;
14; @keyword COLORS {type=integer}
15; I gives color of all colorbars. (contrarily to colors
16; which is a vector giving the color of each colorbar).
17;
18; @keyword NOREINITPLT
19; We active it if we do not want environment variables !p, !x, !y, !z
20; to be reinitialized by the procedure <pro>reinitplt</pro>
21;
22; @keyword _EXTRA
23; Used to pass keyword
24;
25; @uses
26; common.pro
27;
28; @restrictions
29; If NOREINITPLT is not activated, all environment
30; variables !p, !x, !y, !z are reinitializted by the procedure <pro>reinitplt</pro>
31;
32; @examples
33; IDL> sbar_plot, indgen(10),small = [2,2,2],/rempli
34; IDL> sbar_plot, indgen(10),small = [2,2,3],/noerase
35; IDL> \@ps
36;
37; @history
38; Sebastien Masson (smasson\@lodyc.jussieu.fr)
39;                      10/10/1999
40;
41; @version
42; $Id$
43;
44;-
45PRO sbar_plot, values, COLORS=colors, NOREINITPLT=noreinitplt, _EXTRA=ex
46;
47  compile_opt idl2, strictarrsubs
48;
49@common
50; 1) I reinitialize the graphic environment (variables !x, !y and !p):
51   if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
52; 2) I place the drawing on the screen like on the postscript
53   IF chkstru(ex, 'overplot')EQ 0 THEN placedessin, 'autre', _extra = ex
54; 3) Drawing
55   if n_elements(COLORS) NE 0 then BEGIN
56      if n_elements(COLORS) EQ n_elements(Values) then col = colors $
57       ELSE col = replicate(colors[0], n_elements(Values))
58   ENDIF ELSE col = congrid(indgen(!d.n_colors < 256), n_elements(Values))
59;
60   bar_plot, Values, background = !p.background, colors = col $
61             , xstyle = 1, ystyle = 1, _extra = ex
62; 4) End of drawing
63   terminedessin, _extra=ex
64
65   return
66end
Note: See TracBrowser for help on using the repository browser.