defsubcell.pro
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
;+
; NAME:
; DEFSUBCELL
;
; AUTHOR:
; Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
; craigm@lheamail.gsfc.nasa.gov
;
; PURPOSE:
; Returns a default subcell suitable for plotting in.
;
; CALLING SEQUENCE:
; sub = defsubcell( [default] )
;
; DESCRIPTION:
;
; DEFSUBCELL returns a "nice" subcell, useful for plotting in. It
; gives 8% margins on the left and bottom, and 5% margins on the
; right and top.
;
; A set of user-defined default values can be passed in. Any that
; are negative are replaced by this function's.
;
; INPUTS:
;
; DEFAULT - a "default" subcell. Any elements that are negative are
; replaced by DEFSUBCELL's notion of the proper margins.
; This feature is used, for example, by SUBCELLARRAY to
; make subcells that have special margins on certain sides
; and default ones on other sides.
;
; OPTIONAL INPUTS:
; NONE
;
; INPUT KEYWORD PARAMETERS:
;
; NONE
;
; RETURNS:
; The new subcell.
;
; PROCEDURE:
;
; EXAMPLE:
;
; SEE ALSO:
;
; DEFSUBCELL, SUBCELLARRAY
;
; EXTERNAL SUBROUTINES:
;
; MODIFICATION HISTORY:
; Written, CM, 1997
;
;-
function defsubcell, default
if n_elements(default) EQ 0 then default = [-1.,-1,-1,-1]
mysubcell = default
defaultsubpos = [ 0.08, 0.08, 0.95, 0.95 ]
iwh = where(mysubcell LT 0, ict)
if ict GT 0 then $
mysubcell(iwh) = defaultsubpos(iwh)
return, mysubcell
end