source: trunk/PLOTS/DIVERS/placecolor.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME:PLACECOLOR
6;
7; PURPOSE:permet de tracer la colorbar independammment d'un graphe
8;
9; CATEGORY:graph
10;
11; CALLING SEQUENCE:placecolor,pos
12;
13; INPUTS:
14;       pos:vecteur de 4 elements donnant les coordonnees du coin en bas
15; a gauche et de celui en haut a droite -en cm- ds lequel on veut faire la
16; barre de couleur
17;
18; KEYWORD PARAMETERS: tous ceux de colorbar.pro.
19;
20; par defaut trace une barre de couleur du meme type que celle presente ds plt
21; et pltz. si max, min et divisions ne sont pas stipulees alors max=sup,min=inf
22; et divisions=div
23;
24; OUTPUTS:
25;
26; COMMON BLOCKS:
27;       common.pro
28;
29; SIDE EFFECTS:
30;
31; RESTRICTIONS:utilisable que pour les POSTCRIPT effectues avec plein2dessin
32;
33; EXAMPLE:
34;
35; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)
36;                       7/5/98
37;-
38;------------------------------------------------------------
39;------------------------------------------------------------
40;------------------------------------------------------------
41pro placecolor,pos,_extra = ex
42@common
43;------------------------------------------------------------
44   xsave = !x
45   ysave = !y
46   psave = !p
47
48   reinitplt, /z, /invert
49   pos=1.*pos
50   if key_portrait eq 1 then begin
51      pos[0]=pos[0]/petitfeuille   
52      pos[1]=pos[1]/grandfeuille   
53      pos[2]=pos[2]/petitfeuille   
54      pos[3]=pos[3]/grandfeuille   
55   endif else begin
56      pos[0]=pos[0]/grandfeuille   
57      pos[1]=pos[1]/petitfeuille   
58      pos[2]=pos[2]/grandfeuille   
59      pos[3]=pos[3]/petitfeuille   
60   endelse
61   if keyword_set(divisions) eq 0 then divisions=colorbardiv
62   if keyword_set(max) eq 0 then max=colorbarsup
63   if keyword_set(min) eq 0 then min=colorbarinf
64   COLORBAR, COLOR=0, DIVISIONS=divisions, DISCRET=couleur, cb_color = 0, $
65    POSITION=pos, MAX=max, MIN=min, cb_charsize=!p.charsize, _extra = ex
66
67   !x = xsave
68   !y = ysave
69   !p = psave
70;------------------------------------------------------------
71   return
72end
Note: See TracBrowser for help on using the repository browser.