List routines by category:
Atmospheric Sciences |
Benchmarking |
Color |
Date/Time |
Doc |
File & I/O |
BPCH Format |
Scientific Data Formats |
GAMAP Examples |
GAMAP Internals |
GAMAP Utilities |
GAMAP Data Manipulation |
GAMAP Models &
Grids |
GAMAP Plotting |
General |
Graphics |
Math & Units |
Plotting |
Regridding |
Strings |
Structures |
Time Series
List routines by alphabetical order:
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z
NAME:
YBOXPLOT
PURPOSE:
Produce a box and whisker plot of a data vector
categories displayed on the Y axis as opposed to boxplot
CATEGORY:
Plotting
CALLING SEQUENCE:
YBOXPLOT, DATA [,keywords]
INPUTS:
DATA -> the data vector
KEYWORD PARAMETERS:
GROUP -> array of the same dimension as DATA which contains
grouping information. One box is plotted for each group.
If MINGROUP or MAXGROUP are given, boxes and whiskers are
only plotted for group values within this range.
GROUP may not contain more than 28 different values.
Group can also be a string array. In this case MINGROUP
and MAXGROUP make no sense of course.
MINGROUP -> the minimum group value for which a box shall be
plotted
MAXGROUP -> the maximum group value for which a box shall be
plotted
LABEL -> string array containing labels for *different* groups.
NOTE: The user must take care that one label is passed for
each group to be plotted. If label is not specified, the
group values will be used as axis labels
COLOR -> plotting color for axis (default : 1, i.e. black in MYCT
color scheme). Will also be used as default for BOXCOLOR.
BOXCOLOR -> color of the boxes (frames). Default is the COLOR
value, i.e. 1 if not specified. This color will also be used as
default for MEDIANCOLOR and MEANCOLOR. If you want boxes that
are only filled but have no frame, you must specify BOXCOLOR=-1.
In this case the default for MEDIANCOLOR and MEANCOLOR will
be the COLOR value.
BOXWIDTH -> relative width of boxes (default: 0.8).
BOXPOSITION -> relative position of box on x axis (default: 0.).
This parameter can be used together with the OVERPLOT keyword
to plot multiple groups of boxes in one graph.
MEDIANCOLOR -> a color value for the median bar
(default: value of BOXCOLOR)
MEANSYMBOL -> symbol to be used for mean values. If no symbol
is given, no mean values will be drawn.
MEANCOLOR -> color for mean symbols (default: value of BOXCOLOR)
FILLCOLOR -> a value or an array containing the colorindex for all
boxes or each box, respectively. If a single value is given,
*all* boxes will be filled with this color. If an array is
passed that has less elements than there are groups to plot,
the remaining colors will be filled with 15 (grey in MYCT
standard-scheme). If no FILLCOLOR is specified, the boxes will
be empty.
MISSING -> a value that represents missing data. If given, any data
with a value of missing will be filtered out before plotting.
PRINTN -> print number of elements on top of each box/whisker
CHARSIZE -> character size of the PRINTN labels (default: 0.8)
/OVERPLOT -> do not draw a new coordinate system but overlay new
data. For 2 sets of data you should use BOXWIDTH=0.4 and
BOXPOSITION=-0.25 and 0.25, respectively.
ORIENTATION -> orientation for axis labels (see XYOUTS procedure)
/IS_PERCENTILE -> data are already processed percentiles. In this
case data must be an array with dimensions 5,N. The GROUP keyword
is ignored, and each set of the N percentiles will be treated as
one group.
PERCVAL -> float array with 5 elements denoting the percentile
values (default: 0.05, 0.25, 0.5, 0.75, 0.95)
Further keywords are passed to the PLOT routine and can be used
to determine the appearance of the plot (e.g. XTITLE,YTITLE,
YSTYLE,YRANGE,/YLOG,COLOR,THICK)
OUTPUTS:
None
SUBROUTINES:
External Subroutines Required:
================================
PERCENTILES (function)
REQUIREMENTS:
None
NOTES:
None
EXAMPLES:
(1)
O3 = DATA( where( header eq 'O3' ), * )
ALT = DATA( WHERE( HEADER EQ 'ALT' ), * )
IALT = 2.0 * FIX( ALT / 2.0 )
YBOXPLOT, O3, GROUP=IALT
; produces a boxplot with ozone percentiles in
; altitude bins of 2 (km). Axis, box frames and
; labels will be black, boxes are not color filled.
(2)
YBOXPLOT, O3, GROUP=IALT, FILLC=15, MEANSYM=SYM(1), $
MEANCOL=!MYCT.RED, BOXWIDTH=0.6, YTITLE='O3', $
XTITLE='ALT. BIN', MISSING=-999.99, /PRINTN
; produces boxes that are filled with light grey and
; have a black frame and median line. A red filled
; circle denotes the mean value, titles are assigned
; to the x and y axis. The number of valid observations
; is printed on top of each box. The boxes are reduced
; in size.
(3)
CO = DATA( WHERE( HEADER EQ 'CO' ), * )
YBOXPLOT, O3, GROUP=IALT, MISSING=-999.99, $
BOXCOL=!MYCT.BLUE, BOXWIDTH=0.4, BOXPOS=-0.25
YBOXPLOT, CO, GROUP=IALT, MISSING=-999.99, $
BOXCOL=!MYCT.RED, BOXWIDTH=0.4, BOXPOS=+0.25, /OVERPLOT
; produces a plot with blue box frames for ozone
; and red frames for CO data.
MODIFICATION HISTORY:
mgs, 30 Jul 1997: VERSION 1.00
mgs, 03 Aug 1997: added template
mgs, 27 Nov 1997: some revisions and suggested changes by T.Brauers:
- better color handling (NOTE: meaning of BOXCOLOR has changed)
- optional overlay of mean value
- box frames
- variable boxwidth
- error fixing lower upper boundaries in log plots
- bug fix with label keyword
- added OVERPLOT and BOXPOSITION keywords
mgs, 22 Jan 1998: added IS_PERCENTILE keyword to allow
plotting of data that has been processed already
mgs, 17 Apr 1998:
- x-axis handling improved (now uses axis command and xyouts)
- orientation and medianthick keywords added
- CREATED as yboxplot
mgs, 06 May 1998:
- added percval keyword
mgs, 21 May 1998:
- percval defaults changed from min,max to 5%, 95%
bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/plotting/yboxplot.pro)
NAME:
YESNO
PURPOSE:
Query user for decisions with only two possible answers.
CATEGORY:
General
CALLING SEQUENCE:
ANSWER = YESNO( QUESTION [,DEFAULT=DEFAULT ,/STRING ] )
INPUTS:
QUESTION -> A string containing the query. The following
will automatically be added to QUESTION: ' (Y/N) [x] : '
where x is replaced by the default selection.
KEYWORD PARAMETERS:
DEFAULT -> either 0 (for 'NO') or 1 (for 'YES'). Default is 0.
/QUIT_OPTION -> if set, the user can quit with 'Q'. This
option is appended to the (Y/N) string. YesNo returns
-1 if quit was selected.
/STRING -> set this keyword to return a 'Y' or 'N' instead
of the numerical values 0 or 1.
OUTPUTS:
ANSWER -> An integer 0 or 1 that can be used in boolean
expressions, or a 1 character string if /STRING is set.
-1 is returned if /QUIT was allowed and used.
SUBROUTINES:
None
REQUIREMENTS:
None
NOTES:
'0' or '1' are also accepted as input. Everything but
'y', 'Y', '1' is treated as 'N'. 'Q' or 'C' can both
be used to quit.
EXAMPLES:
(1)
IF ( YESNO( 'Shall we meet today?', DEFAULT=1) ) $
THEN GOTO, MEETING
(2)
ANS = YESNO( 'Do you really want to quit?' )
if ( ans ) then return
(3)
ANS = YESNO( 'Save data ?', /QUIT, default=1 )
IF ( ANS LT 0 ) THEN RETURN
MODIFICATION HISTORY:
mgs, 22 Jan 1999: VERSION 1.00
mgs, 23 Mar 1999: - added /QUIT option
- bug fix: '0' was recognized as 'Y'
bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/general/yesno.pro)
NAME:
YMD2DATE
PURPOSE:
Given year, month, day (or hour, minute, second) values,
returns a variable in YYYYMMDD (or HHMMSS) format.
CATEGORY:
Date & Time
CALLING SEQUENCE:
RESULT = YMD2DATE( YEAR, MONTH, DAY )
INPUTS:
YEAR -> Year (or hour ) value
MONTH -> Month (or minute) value
DAY -> Day (or second) value
KEYWORD PARAMETERS:
None
OUTPUTS:
None
SUBROUTINES:
None
REQUIREMENTS:
None
NOTES:
None
EXAMPLE:
PRINT, YMD2DATE( 2006, 1, 1 )
20060101
; Takes separate Y, M, D values and creates a date variable.
PRINT, YMD2DATE( 12, 30, 0 )
123000
; Takes separate H, Mi, S values and creates a time variable.
MODIFICATION HISTORY:
bmy, 06 Jun 2006: TOOLS VERSION 2.05
bmy & phs, 13 Jul 2007: GAMAP VERSION 2.10
(See /n/home09/ryantosca/IDL/gamap2/date_time/ymd2date.pro)