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

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

corrections of some headers and parameters and keywords case. change of pro2href to replace proidl

  • 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 reinitializated by the procedure reinitplt
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 reinitplt
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;-
45;
46PRO sbar_plot, values, COLORS = colors, NOREINITPLT = noreinitplt, _EXTRA = ex
47;
48  compile_opt idl2, strictarrsubs
49;
50@common
51; 1) I reinitialize the graphic environment (variables !x, !y et !p):
52   if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex
53; 2) I place the drawing on the screen like on the postscript
54   IF chkstru(ex, 'overplot')EQ 0 THEN placedessin, 'autre', _extra = ex
55; 3) Drawing
56   if n_elements(COLORS) NE 0 then BEGIN
57      if n_elements(COLORS) EQ n_elements(Values) then col = colors $
58       ELSE col = replicate(colors[0], n_elements(Values))
59   ENDIF ELSE col = congrid(indgen(!d.n_colors < 256), n_elements(Values))
60;
61   bar_plot, Values, background = !p.background, colors = col $
62             , xstyle = 1, ystyle = 1, _extra = ex
63; 4) End of drawing
64   terminedessin, _extra=ex
65
66   return
67end
Note: See TracBrowser for help on using the repository browser.