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

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

typo

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
RevLine 
[2]1;+
2;
[231]3; @file_comments
[163]4; Same thing that bar_plot but compatible with the whole environment (common.pro included)
[2]5;
[157]6; @categories Graphics
[2]7;
[163]8; @keyword COLORS {type=vector}
[142]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).
[2]13;
[163]14; @keyword COLORS {type=integer}
[231]15; I gives color of all colorbars. (contrarily to colors
[142]16; which is a vector giving the color of each colorbar).
[2]17;
[142]18; @keyword NOREINITPLT
[231]19; We active it if we do not want environment variables !p, !x, !y, !z
[295]20; to be reinitialized by the procedure <pro>reinitplt</pro>
[2]21;
[142]22; @keyword _EXTRA
[231]23; Used to pass keyword
[2]24;
[142]25; @uses
26; common.pro
[2]27;
[231]28; @restrictions
29; If NOREINITPLT is not activated, all environment
[295]30; variables !p, !x, !y, !z are reinitializted by the procedure <pro>reinitplt</pro>
[2]31;
[142]32; @examples
[237]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
[2]36;
[142]37; @history
[157]38; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[2]39;                      10/10/1999
[142]40;
41; @version
42; $Id$
43;
[2]44;-
[114]45;
[262]46PRO sbar_plot, values, COLORS = colors, NOREINITPLT = noreinitplt, _EXTRA = ex
[231]47;
[114]48  compile_opt idl2, strictarrsubs
49;
[2]50@common
[231]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
[2]54   IF chkstru(ex, 'overplot')EQ 0 THEN placedessin, 'autre', _extra = ex
[231]55; 3) Drawing
[69]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))
[2]60;
[69]61   bar_plot, Values, background = !p.background, colors = col $
[67]62             , xstyle = 1, ystyle = 1, _extra = ex
[231]63; 4) End of drawing
64   terminedessin, _extra=ex
[2]65
66   return
67end
Note: See TracBrowser for help on using the repository browser.