source: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placecolor.pro @ 232

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

improvements/corrections of some *.pro headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1;+
2;
3; @file_comments
4; allows to trace the independently from a graph
5; By default, trace a color bar of the same type than the one present in plt
6; and pltz. If max, min and divisions are not stipulated, then max=sup,min=inf
7; and divisions=div.
8;
9; @categories
10; Graphics
11;
12; @param POS
13; Vector composed by 4 elements giving coordinates of the left bottom
14; corner and of the right up one -in cm- in which we want to do the color bar
15;
16; @keyword _EXTRA
17; Used to pass keywords
18;
19; @uses
20; common.pro
21;
22; @restrictions
23; Only usable for Postscripts effectuated with plein2dessin
24;
25; @history
26; Sebastien Masson (smasson\@lodyc.jussieu.fr)
27;                       7/5/98
28;
29; @version
30; $Id$
31;
32;-
33;
34PRO placecolor, pos, _EXTRA = ex
35;
36  compile_opt idl2, strictarrsubs
37;
38@cm_4ps
39   IF NOT keyword_set(key_forgetold) THEN BEGIN
40@updatenew
41   ENDIF
42;
43   xsave = !x
44   ysave = !y
45   psave = !p
46;
47   reinitplt, /z, /invert
48   pos=1.*pos
49   mipgsz = min(page_size, max = mapgsz)
50   if key_portrait eq 1 then begin
51      pos[0]=pos[0]/mipgsz
52      pos[1]=pos[1]/mapgsz
53      pos[2]=pos[2]/mipgsz
54      pos[3]=pos[3]/mapgsz
55   endif else begin
56      pos[0]=pos[0]/mapgsz
57      pos[1]=pos[1]/mipgsz
58      pos[2]=pos[2]/mapgsz
59      pos[3]=pos[3]/mipgsz
60   ENDELSE
61;
62   def_myuniquetmpdir
63;
64   IF lmgr(/demo) EQ 1 THEN BEGIN
65; if we are in demo mode, we cannot save the parameters in a temporary file...
66@cm_demomode_used
67;
68      colnumb = colorbarparam.colnumb
69      clbinf = colorbarparam.clbinf
70      clbsup = colorbarparam.clbsup
71      clbdiv = colorbarparam.clbdiv
72;
73   ENDIF ELSE BEGIN
74      file = myuniquetmpdir + '4colorbar.dat'
75      IF file_test(file) THEN BEGIN
76         restore, file
77         if size(ex, /type) EQ 8 then BEGIN
78            if (where(tag_names(ex) EQ 'MIN'))[0] NE -1 then clbinf = ex.MIN
79            if (where(tag_names(ex) EQ 'MAX'))[0] NE -1 then clbsup = ex.MAX
80            if (where(tag_names(ex) EQ 'DIVISIONS'))[0] NE -1 then clbdiv = ex.DIVISIONS
81         ENDIF
82;
83         COLORBAR, COLOR = 0, DIVISIONS = clbdiv, DISCRET = colnumb $
84          , cb_color = 0, POSITION = pos, MAX = clbsup $
85          , MIN = clbinf, cb_charsize = !p.charsize $
86          , _extra = ex
87      ENDIF
88   ENDELSE
89;
90   !x = xsave
91   !y = ysave
92   !p = psave
93;
94   return
95end
Note: See TracBrowser for help on using the repository browser.