This page is a listing of the entire contents of this library for IDL. This listing is the long version. Viewing the much more compact listing may be handier.
NAME:
ASPECT
PURPOSE:
This function calculates and returns the normalized position
coordinates necessary to put a plot with a specified aspect ratio
into the currently active graphics window. It works on the display
output window as well as in a PostScript output window.
CATEGORY:
Graphics
CALLING SEQUENCE:
position = ASPECT(aspectRatio)
INPUTS:
aspectRatio: A floating point value that is the desired aspect
ratio (ratio of heigth to width) of the plot in the current
graphics output window. If this parameter is missing, an aspect
ratio of 1.0 (a square plot) is assumed.
KEYWORD PARAMETERS:
MARGIN: The margin around the edges of the plot. The value must be
a floating point value between 0.0 and 0.5. It is expressed in
normalized coordinate units. The default margin is 0.15.
OUTPUTS:
position: A four-element floating array of normalized coordinates.
The order of the elements is [x0, y0, x1, y1], similar to the
!P.POSITION system variable or the POSITION keyword on any IDL
graphic command.
EXAMPLE:
To create a plot with an aspect ratio of 1:2 and a margin of
0.10 around the edge of the output window, do this:
plotPosition = ASPECT(0.5, Margin=0.10)
PLOT, Findgen(11), POSITION=plotPosition
Notice this can be done in a single IDL command, like this:
PLOT, Findgen(11), POSITION=ASPECT(0.5, Margin=0.10)
MODIFICATION HISTORY:
Written by: David Fanning, Novermber 1996.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/aspect.pro)
NAME:
CW_BBSELECTOR
PURPOSE:
CW_BBSELECTOR is a compound widget that appears as a pull-down
menu whose label shows the widget's current value. When the button
is pressed, the menu appears and the newly selected value becomes
the new title of the pull-down menu.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
widget = CW_BBSELECTOR(Parent, Names)
To get or set the value of a CW_BBSELECTOR, use the GET_VALUE and
SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BBSELECTOR
is the index of the selected item.
INPUTS:
Parent: The ID of the parent widget.
Names: A string array, containing one string per button,
giving the name of each button.
KEYWORD PARAMETERS:
EVENT_FUNCT: The name of an optional user-supplied event function
for buttons. This function is called with the return
value structure whenever a button is pressed, and
follows the conventions for user-written event
functions.
FONT: The name of the font to be used for the button
titles. If this keyword is not specified, the default
font is used.
FRAME: Specifies the width of the frame to be drawn around
the base.
IDS: A named variable into which the button IDs will be
stored, as a longword vector.
LABEL_LEFT: Creates a text label to the left of the buttons.
LABEL_TOP: Creates a text label above the buttons.
MAP: If set, the base will be mapped when the widget
is realized (the default).
RETURN_ID: If set, the VALUE field of returned events will be
the widget ID of the button.
RETURN_INDEX: If set, the VALUE field of returned events will be
the zero-based index of the button within the base.
THIS IS THE DEFAULT.
RETURN_NAME: If set, the VALUE field of returned events will be
the name of the button within the base --
N.B. this is ignored if the button has a
bitmap label.
RETURN_UVALUE: An array of user values to be associated with
each button. Selecting the button sets the uvalue
of the CW_BBSELECTOR to the button's uvalue and
returns the uvalue in the value field of the event
structure. If this keyword isn't specified, the
CW_BBSELECTOR's uvalue remains unchanged.
SET_VALUE: The initial value of the buttons. This keyword is
set to the index of the Names array element desired.
So if it is desired that the initial value be the
second element of the Names array, SET_VALUE would
be set equal to 1. This is equivalent to the later
statement:
WIDGET_CONTROL, widget, set_value=value
TRACKING_EVENTS: Return tracking events
UVALUE: The user value to be associated with the widget.
XOFFSET: The X offset of the widget relative to its parent.
YOFFSET: The Y offset of the widget relative to its
parent.
X_BITMAP_EXTRA Number of bits at the end of each row of a
bitmap label to ignore, only used for bitmap
buttons.
OUTPUTS:
The ID of the created widget is returned.
SIDE EFFECTS:
This widget generates event structures with the following definition:
event = { ID:0L, TOP:0L, HANDLER:0L, INDEX:0, VALUE:0 }
The INDEX field is the index (0 based) of the menu choice. VALUE is
either the INDEX, ID, NAME, or BUTTON_UVALUE of the button,
depending on how the widget was created.
RESTRICTIONS:
Bitmap restriction removed, but return_name and bitmap are
still incompatible.
MODIFICATION HISTORY:
1 April 1993, DMS, Adapted from CW_BGROUP.
22 Dec. 1993, KDB, Corrected documentation for keyword SET_VALUE.
Sept 95, SJT (U. of B'ham) Modify to allow bitmap buttons
(rename CW_BBSELECTOR to avoid potential confusion)
4/12/95; SJT: Add the tracking_events keyword.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/cw_bbselector.pro)
NAME:
CW_BTGROUP
PURPOSE:
CW_BTGROUP is a compound widget that simplifies creating
a base of buttons. It handles the details of creating the
proper base (standard, exclusive, or non-exclusive) and filling
in the desired buttons. Events for the individual buttons are
handled transparently, and a CW_BTGROUP event returned. This
event can return any one of the following:
- The Index of the button within the base.
- The widget ID of the button.
- The name of the button.
- An arbitrary value taken from an array of User values.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
Widget = CW_BTGROUP(Parent, Names)
To get or set the value of a CW_BTGROUP, use the GET_VALUE and
SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BTGROUP
is:
-----------------------------------------------
Type Value
-----------------------------------------------
normal None
exclusive Index of currently set button
non-exclusive Vector indicating the position
of each button (1-set, 0-unset)
-----------------------------------------------
INPUTS:
Parent: The ID of the parent widget.
Names: A string array, containing one string per button,
giving the name of each button.
KEYWORD PARAMETERS:
BUTTON_UVALUE: An array of user values to be associated with
each button and returned in the event structure.
COLUMN: Buttons will be arranged in the number of columns
specified by this keyword.
EVENT_FUNCT: The name of an optional user-supplied event function
for buttons. This function is called with the return
value structure whenever a button is pressed, and
follows the conventions for user-written event
functions.
EXCLUSIVE: Buttons will be placed in an exclusive base, with
only one button allowed to be selected at a time.
FONT: The name of the font to be used for the button
titles. If this keyword is not specified, the default
font is used.
FRAME: Specifies the width of the frame to be drawn around
the base.
IDS: A named variable into which the button IDs will be
stored, as a longword vector.
LABEL_LEFT: Creates a text label to the left of the buttons.
LABEL_TOP: Creates a text label above the buttons.
MAP: If set, the base will be mapped when the widget
is realized (the default).
NONEXCLUSIVE: Buttons will be placed in an non-exclusive base.
The buttons will be independent.
NO_RELEASE: If set, button release events will not be returned.
RETURN_ID: If set, the VALUE field of returned events will be
the widget ID of the button.
RETURN_INDEX: If set, the VALUE field of returned events will be
the zero-based index of the button within the base.
THIS IS THE DEFAULT.
RETURN_NAME: If set, the VALUE field of returned events will be
the name of the button within the base.
ROW: Buttons will be arranged in the number of rows
specified by this keyword.
SCROLL: If set, the base will include scroll bars to allow
viewing a large base through a smaller viewport.
SET_VALUE: The initial value of the buttons. This is equivalent
to the later statement:
WIDGET_CONTROL, widget, set_value=value
SPACE: The space, in pixels, to be left around the edges
of a row or column major base. This keyword is
ignored if EXCLUSIVE or NONEXCLUSIVE are specified.
UVALUE: The user value to be associated with the widget.
XOFFSET: The X offset of the widget relative to its parent.
XPAD: The horizontal space, in pixels, between children
of a row or column major base. Ignored if EXCLUSIVE
or NONEXCLUSIVE are specified.
XSIZE: The width of the base.
X_SCROLL_SIZE: The width of the viewport if SCROLL is specified.
YOFFSET: The Y offset of the widget relative to its parent.
YPAD: The vertical space, in pixels, between children of
a row or column major base. Ignored if EXCLUSIVE
or NONEXCLUSIVE are specified.
YSIZE: The height of the base.
Y_SCROLL_SIZE: The height of the viewport if SCROLL is specified.
TRACKING_EVENTS:Return tracking events.
OUTPUTS:
The ID of the created widget is returned.
SIDE EFFECTS:
This widget generates event structures with the following definition:
event = { ID:0L, TOP:0L, HANDLER:0L, SELECT:0, VALUE:0 }
The SELECT field is passed through from the button event. VALUE is
either the INDEX, ID, NAME, or BUTTON_UVALUE of the button,
depending on how the widget was created.
RESTRICTIONS:
Only buttons with textual names are handled by this widget.
Bitmaps are not understood.
MODIFICATION HISTORY:
15 June 1992, AB
7 April 1993, AB, Removed state caching.
6 Oct. 1994, KDB, Font keyword is not applied to the label.
10 FEB 1995, DJC fixed bad bug in event procedure, getting
id of stash widget.
11 April 1995, AB Removed Motif special cases.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/cw_btgroup.pro)
NAME:
CW_PDTMENU
PURPOSE:
CW_PDTMENU is a compound widget that simplifies creating
pulldown menus. It has a simpler interface than the XPDTMENU
procedure, which it is intended to replace. Events for the
individual buttons are handled transparently, and a CW_PDTMENU
event returned. This event can return any one of the following:
- The Index of the button within the base.
- The widget ID of the button.
- The name of the button.
- The fully qualified name of the button. This allows
different sub-menus to contain buttons with the same
name in an unambiguous way.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
widget = CW_PDTMENU(Parent, Desc)
INPUTS:
Parent: The ID of the parent widget.
Desc: An array of strings or structures. Each element contains
a menu description with two fields, a flag field, and
the name of the item. If a structure, each element
is defined as follows:
{ CW_PDTMENU_S, flags:0, name:'' }
The name tag gives the name of button. The flags
field is a two-bit bitmask that controls how the button is
interpreted:
Value Meaning
-------------------------------------------
0 This button is neither the beginning
nor the end of a pulldown level.
1 This button is the root of a
sub-pulldown menu. The sub-buttons
start with the next button.
2 This button is the last button at the
current pulldown level. The next button
belongs to the same level as the current
parent button.
3 This button is the root of a sub-pulldown
menu, but it is also the last entry of
the current level.
If Desc is a string, each element contains the flag field
followed by a backslash character, followed by the menu item's
contents. See the example below.
EVENT PROCEDURES: An event procedure may be specified for an
element and all its children, by including a third field
in Desc, if Desc is a string array. Events for buttons without
an event procedure, are dispatched normally.
See the example below.
KEYWORD PARAMETERS:
COLUMN: Make the implict base a column base (with N
columns)
DELIMITER: The character used to separate the parts of a
fully qualified name in returned events. The
default is to use the '.' character.
FONT: The name of the font to be used for the button
titles. If this keyword is not specified, the
default font is used.
HELP: If MBAR is specified and one of the buttons on the
menubar has the label "help" (case insensitive) then
that button is created with the /HELP keyword to
give it any special appearance it is supposed to
have on a menubar. For example, Motif expects
help buttons to be on the right.
IDS: A named variable into which the button IDs will
be stored as a longword vector.
MBAR: if constructing a menu-bar pulldown, set this
keyword. In this case, the parent must be the
widget id of the menu bar of a top-level base,
returned by WIDGET_BASE(..., MBAR=mbar).
RETURN_ID: If present and non-zero, the VALUE field of returned
events will be the widget ID of the button.
RETURN_INDEX: If present and non-zero, the VALUE field of returned
events will be the zero-based index of the button
within the base. THIS IS THE DEFAULT.
RETURN_NAME: If present and non-zero, the VALUE field of returned
events will be the name of the selected button.
RETURN_FULL_NAME: If present and non-zero, the VALUE field of returned
events will be the fully qualified name of the
selected button. This means that the names of all
the buttons from the topmost button of the pulldown
menu to the selected one are concatenated with the
delimiter specified by the DELIMITER keyword. For
example, if the top button was named COLORS, the
second level button was named BLUE, and the selected
button was named LIGHT, the returned value would be
COLORS.BLUE.LIGHT
This allows different submenus to have buttons with
the same name (e.g. COLORS.RED.LIGHT).
ROW: Make the implict base a row base (with N
rows)
UVALUE: The user value to be associated with the widget.
XOFFSET: The X offset of the widget relative to its parent.
YOFFSET: The Y offset of the widget relative to its parent.
TRACKING_EVENTS: Enable widget tracking events.
OUTPUTS:
The ID of the top level button is returned.
SIDE EFFECTS:
This widget generates event structures with the following definition:
event = { ID:0L, TOP:0L, HANDLER:0L, VALUE:0 }
VALUE is either the INDEX, ID, NAME, or FULL_NAME of the button,
depending on how the widget was created.
RESTRICTIONS:
Only buttons with textual names are handled by this widget.
Bitmaps are not understood.
EXAMPLE:
The following is the description of a menu bar with two buttons,
"Colors" and "Quit". Colors is a pulldown containing the colors
"Red", "Green", Blue", "Cyan", and "Magenta". Blue is a sub-pulldown
containing "Light", "Medium", "Dark", "Navy", and "Royal":
; Make sure CW_PDTMENU_S is defined
junk = { CW_PDTMENU_S, flags:0, name:'' }
; The description
desc = [ { CW_PDTMENU_S, 1, 'Colors' }, $
{ CW_PDTMENU_S, 0, 'Red' }, $
{ CW_PDTMENU_S, 0, 'Green' }, $
{ CW_PDTMENU_S, 1, 'Blue' }, $
{ CW_PDTMENU_S, 0, 'Light' }, $
{ CW_PDTMENU_S, 0, 'Medium' }, $
{ CW_PDTMENU_S, 0, 'Dark' }, $
{ CW_PDTMENU_S, 0, 'Navy' }, $
{ CW_PDTMENU_S, 2, 'Royal' }, $
{ CW_PDTMENU_S, 0, 'Cyan' }, $
{ CW_PDTMENU_S, 2, 'Magenta' }, $
{ CW_PDTMENU_S, 2, 'Quit' } ]
The same menu may be defined as a string by equating the Desc parameter
to the following string array:
desc =[ '1\Colors' , $
'0\Red' , $
'0\Green' , $
'1\Blue\BLUE_EVENT_PROC' , $
'0\Light' , $
'0\Medium' , $
'0\Dark' , $
'0\Navy' , $
'2\Royal' , $
'0\Cyan' , $
'2\Magenta\MAGENTA_EVENT_PROC' , $
'2\Quit' ]
The following small program can be used with the above description
to create the specified menu:
base = widget_base()
menu = cw_pdtmenu(base, desc, /RETURN_FULL_NAME)
WIDGET_CONTROL, /REALIZE, base
repeat begin
ev = WIDGET_EVENT(base)
print, ev.value
end until ev.value eq 'Quit'
WIDGET_CONTROL, /DESTROY, base
end
Note that independent event procedures were specified for
the multiple Blue buttons (blue_event_proc), and the Magenta button
(magenta_event_proc).
MODIFICATION HISTORY:
18 June 1992, AB
16 Jan 1995, DMS, Added MBAR keyword, event procedures,
and menu descriptor strings.
2 July 1995, AB, Added HELP keyword.
1996: SJT, Tracking keyword added
11/11/96: SJT, ROW keyword added and COLUMN documented.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/cw_pdtmenu.pro)
NAME:
CW_PDTSMENU
PURPOSE:
CW_PDTSMENU is a compound widget that simplifies creating
pulldown menus. It has a simpler interface than the XPDTSMENU
procedure, which it is intended to replace. Events for the
individual buttons are handled transparently, and a CW_PDTSMENU
event returned. This event can return any one of the following:
- The Index of the button within the base.
- The widget ID of the button.
- The name of the button.
- The fully qualified name of the button. This allows
different sub-menus to contain buttons with the same
name in an unambiguous way.
CATEGORY:
Compound widgets.
CALLING SEQUENCE:
widget = CW_PDTSMENU(Parent, Desc)
INPUTS:
Parent: The ID of the parent widget.
Desc: An array of strings or structures. Each element contains
a menu description with two fields, a flag field, and
the name of the item. If a structure, each element
is defined as follows:
{ CW_PDTSMENU_S, flags:0, name:'' }
The name tag gives the name of button. The flags
field is a two-bit bitmask that controls how the button is
interpreted:
Value Meaning
-------------------------------------------
0 This button is neither the beginning
nor the end of a pulldown level.
1 This button is the root of a
sub-pulldown menu. The sub-buttons
start with the next button.
2 This button is the last button at the
current pulldown level. The next button
belongs to the same level as the current
parent button.
3 This button is the root of a sub-pulldown
menu, but it is also the last entry of
the current level.
If Desc is a string, each element contains the flag field
followed by a backslash character, followed by the menu item's
contents. See the example below.
EVENT PROCEDURES: An event procedure may be specified for an
element and all its children, by including a third field
in Desc, if Desc is a string array. Events for buttons without
an event procedure, are dispatched normally.
See the example below.
KEYWORD PARAMETERS:
COLUMN: Make the implict base a column base (with N
columns)
DELIMITER: The character used to separate the parts of a
fully qualified name in returned events. The
default is to use the '.' character.
FONT: The name of the font to be used for the button
titles. If this keyword is not specified, the
default font is used.
HELP: If MBAR is specified and one of the buttons on the
menubar has the label "help" (case insensitive) then
that button is created with the /HELP keyword to
give it any special appearance it is supposed to
have on a menubar. For example, Motif expects
help buttons to be on the right.
IDS: A named variable into which the button IDs will
be stored as a longword vector.
MBAR: if constructing a menu-bar pulldown, set this
keyword. In this case, the parent must be the
widget id of the menu bar of a top-level base,
returned by WIDGET_BASE(..., MBAR=mbar).
RETURN_ID: If present and non-zero, the VALUE field of returned
events will be the widget ID of the button.
RETURN_INDEX: If present and non-zero, the VALUE field of returned
events will be the zero-based index of the button
within the base. THIS IS THE DEFAULT.
RETURN_NAME: If present and non-zero, the VALUE field of returned
events will be the name of the selected button.
RETURN_FULL_NAME: If present and non-zero, the VALUE field of returned
events will be the fully qualified name of the
selected button. This means that the names of all
the buttons from the topmost button of the pulldown
menu to the selected one are concatenated with the
delimiter specified by the DELIMITER keyword. For
example, if the top button was named COLORS, the
second level button was named BLUE, and the selected
button was named LIGHT, the returned value would be
COLORS.BLUE.LIGHT
This allows different submenus to have buttons with
the same name (e.g. COLORS.RED.LIGHT).
ROW: Make the implict base a row base (with N
rows)
UVALUE: The user value to be associated with the widget.
XOFFSET: The X offset of the widget relative to its parent.
YOFFSET: The Y offset of the widget relative to its parent.
TRACKING_EVENTS: Enable widget tracking events.
OUTPUTS:
The ID of the top level button is returned.
SIDE EFFECTS:
This widget generates event structures with the following definition:
event = { ID:0L, TOP:0L, HANDLER:0L, VALUE:0 }
VALUE is either the INDEX, ID, NAME, or FULL_NAME of the button,
depending on how the widget was created.
RESTRICTIONS:
Only buttons with textual names are handled by this widget.
Bitmaps are not understood.
EXAMPLE:
The following is the description of a menu bar with two buttons,
"Colors" and "Quit". Colors is a pulldown containing the colors
"Red", "Green", Blue", "Cyan", and "Magenta". Blue is a sub-pulldown
containing "Light", "Medium", "Dark", "Navy", and "Royal":
; Make sure CW_PDTSMENU_S is defined
junk = { CW_PDTSMENU_S, flags:0, name:'',state:0b}
; The description
desc = [ { CW_PDTSMENU_S, 1, 'Colors',0b }, $
{ CW_PDTSMENU_S, 0, 'Red',1b }, $
{ CW_PDTSMENU_S, 0, 'Green',0b }, $
{ CW_PDTSMENU_S, 1, 'Blue',0b }, $
{ CW_PDTSMENU_S, 0, 'Light',0b }, $
{ CW_PDTSMENU_S, 0, 'Medium',0b }, $
{ CW_PDTSMENU_S, 0, 'Dark',0b }, $
{ CW_PDTSMENU_S, 0, 'Navy',0b }, $
{ CW_PDTSMENU_S, 2, 'Royal',0b }, $
{ CW_PDTSMENU_S, 0, 'Cyan',0b }, $
{ CW_PDTSMENU_S, 2, 'Magenta',0b }, $
{ CW_PDTSMENU_S, 2, 'Quit',0b } ]
The same menu may be defined as a string by equating the Desc parameter
to the following string array:
desc =[ '1\Colors' , $
'0\Red' , $
'0\Green' , $
'1\Blue\BLUE_EVENT_PROC' , $
'0\Light' , $
'0\Medium' , $
'0\Dark' , $
'0\Navy' , $
'2\Royal' , $
'0\Cyan' , $
'2\Magenta\MAGENTA_EVENT_PROC' , $
'2\Quit' ]
The following small program can be used with the above description
to create the specified menu:
base = widget_base()
menu = cw_pdtsmenu(base, desc, /RETURN_FULL_NAME)
WIDGET_CONTROL, /REALIZE, base
repeat begin
ev = WIDGET_EVENT(base)
print, ev.value
end until ev.value eq 'Quit'
WIDGET_CONTROL, /DESTROY, base
end
Note that independent event procedures were specified for
the multiple Blue buttons (blue_event_proc), and the Magenta button
(magenta_event_proc).
MODIFICATION HISTORY:
18 June 1992, AB
16 Jan 1995, DMS, Added MBAR keyword, event procedures,
and menu descriptor strings.
2 July 1995, AB, Added HELP keyword.
1996: SJT, Tracking keyword added
11/11/96: SJT, ROW keyword added and COLUMN documented.
17/1/97: SJT, Add a state setter - not a proper "SET_VALUE" to
this stated version.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/cw_pdtsmenu.pro)
NAME: ERRPLOT PURPOSE: Plot radial error bars over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: gr_err_r, r, th, low, high ;To explicitly specify abscissae. INPUTS: R: A vector with the radii Y: A vector with the data values Low: A vector of lower estimates, equal to - error. High: A vector of upper estimates, equal to + error. (If omitted, then +/- errors are equal. KEYWORD Parameters: WIDTH: The width of the error bars. The default is 0.5 degree. mode: 1 for radians, 2 for degrees OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where Y = data values and ERR = symmetrical error estimates, enter: PLOT, Y ;Plot data ERRPLOT, Y-ERR, Y+ERR ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT,Y ERRPLOT, Upper, Lower ;Where Upper & Lower are bounds. To plot versus a vector of abscissae: PLOT, X, Y ;Plot data (X versus Y). ERRPLOT, X, Y-ERR, Y+ERR ;Overplot error estimates. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL. SJT (Sep 1995) Add _EXTRA keyword (call gr_errplot) SJT, June 1996. Change arguments and modify to allow plotting of limits as well as real values. SJT, Nov 1996, Horizontal version. Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_err_r.pro)
NAME: ERRPLOT PURPOSE: Plot horizontal error bars over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: gr_err_x, x, y, low, high ;To explicitly specify abscissae. INPUTS: X: A vector with the abscissę Y: A vector with the data values Low: A vector of lower estimates, equal to - error. High: A vector of upper estimates, equal to + error. (If omitted, then +/- errors are equal. KEYWORD Parameters: WIDTH: The width of the error bars. The default is 1% of plot width. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where Y = data values and ERR = symmetrical error estimates, enter: PLOT, Y ;Plot data ERRPLOT, Y-ERR, Y+ERR ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT,Y ERRPLOT, Upper, Lower ;Where Upper & Lower are bounds. To plot versus a vector of abscissae: PLOT, X, Y ;Plot data (X versus Y). ERRPLOT, X, Y-ERR, Y+ERR ;Overplot error estimates. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL. SJT (Sep 1995) Add _EXTRA keyword (call gr_errplot) SJT, June 1996. Change arguments and modify to allow plotting of limits as well as real values. SJT, Nov 1996, Horizontal version. Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_err_x.pro)
NAME: ERRPLOT PURPOSE: Plot radial error bars over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: gr_err_th, r, th, low, high ;To explicitly specify abscissae. INPUTS: R: A vector with the radii Y: A vector with the data values Low: A vector of lower estimates, equal to - error. High: A vector of upper estimates, equal to + error. (If omitted, then +/- errors are equal. KEYWORD Parameters: WIDTH: The width of the error bars. The default is 0.5 degree. mode: 1 for radians, 2 for degrees OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where Y = data values and ERR = symmetrical error estimates, enter: PLOT, Y ;Plot data ERRPLOT, Y-ERR, Y+ERR ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT,Y ERRPLOT, Upper, Lower ;Where Upper & Lower are bounds. To plot versus a vector of abscissae: PLOT, X, Y ;Plot data (X versus Y). ERRPLOT, X, Y-ERR, Y+ERR ;Overplot error estimates. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL. SJT (Sep 1995) Add _EXTRA keyword (call gr_errplot) SJT, June 1996. Change arguments and modify to allow plotting of limits as well as real values. SJT, Nov 1996, Horizontal version. Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_err_th.pro)
NAME: ERRPLOT PURPOSE: Plot error bars over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: gr_err_y, x, y, low, high ;To explicitly specify abscissae. INPUTS: X: A vector with the abscissę Y: A vector with the data values Low: A vector of lower estimates, equal to - error. High: A vector of upper estimates, equal to + error. (If omitted, then +/- errors are equal. KEYWORD Parameters: WIDTH: The width of the error bars. The default is 1% of plot width. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where Y = data values and ERR = symmetrical error estimates, enter: PLOT, Y ;Plot data ERRPLOT, Y-ERR, Y+ERR ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT,Y ERRPLOT, Upper, Lower ;Where Upper & Lower are bounds. To plot versus a vector of abscissae: PLOT, X, Y ;Plot data (X versus Y). ERRPLOT, X, Y-ERR, Y+ERR ;Overplot error estimates. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL. SJT (Sep 1995) Add _EXTRA keyword (call gr_errplot) SJT, June 1996. Change arguments and modify to allow plotting of limits as well as real values. Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_err_y.pro)
FRACTILE Return the requested fractile of the input data. Usage: fr = fractile(x, frac) Return: fr The requested fractile. Arguments: x most input The array whose fractile(s) are to be returned frac float input The fractile(s) to return. Restrictions: The input data must be a SORTable array (i.e. not complex, string or structure). Example: To find the interquartile range of a data set, try: q = fractile(data, [.25,.75]) iqr = q(1)-q(0) History: Original: 26/9/95; SJT Modify to interpolate: 4/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/fractile.pro)
GRAFFER
Simple interactive data plotter.
Usage:
graffer[, group=group]
Argument:
file string input The initial filename for the graph
file
Keywords:
group long input The group leader of the widget tree.
xsize int input The x dimension of the draw widget
ysize int input The y dimension of the draw widget
debug input If set, then run in debugging mode.
compact input 0: Use the standard full-size layout
1: Use the compact overlayed layout
Not set: Use the full-sized layout if
it will fit on the screen, but use the
comapct form if it won't.
pop_menus input If set, then popup menus will spring
to the front every 2 seconds.
History:
Original: 27/7/95; SJT
V2.00 - Start knocking ideas around, (1) break up the
xsty and ysty tags of pdefs (which are horribly
overloaded in V1.05) into structures.
(2) Reform file into a TAG:VALUE format for
greater flexibility.
- Increase error bar possibilities
- Upgrade function fitting routines
- Rename some routines so that the first 8 chars
are unique (for small-minded systems that only
allow 8.3 filenames).
- Add settings for POSITION (a precursor to
multiple plots on one page?)
- Start to farm out menu panels to procedures in
order to facilitate keeping the standard &
compact versions in step.
- More farming out of bits of the menus
- Modify compact format to put the graphics
window in an independent base (suggestion from
Phil Williams [Children's Hospital Medical
Center, Cincinnati OH]) -- reviving the
original intention of the compact mode.
- Add support for 2-D datasets. Functions F(x,y)
and Z datasets. Display by contours or as an
"image". Also add options to re-order the
datasets, and to write them to a file.
- Add "resource='Graffer'" to all top-level
widgets.
- Make the colour selector in the text-editor
widget into a pull-down like the one on the
dataset menu.
- Major improvements to PostScript options
settings to allow offsets to be adjusted.
- Add an on-line help system
- Extensive changes to popups so that cancelled
operations don't trigger redrawing or set the
changed flag.
- Add options to allow a dataset to be plotted
"Unclipped"
- Display index of current dataset as well as
descriptor.
- Add tracking events to the message box so that
taking the cursor out of it clears the message.
- Add support for Binary GRAFFER files and make
autosave files always binary.
- Improve file handling in several ways:
1) Check if the agument to GRAFFER is a
directory and if so then use it as a
path in the picker.
2) Don't try to find files in a
non-existent or unscannable directory.
3) Put up a prompt when "Save as" or "Open
new" attempt to overwrite an existing
file.
- Solved problem of setting values in a "Stated"
pulldown for the axis style settings. I think
they now reflect correctly the settings of the
current file.
- Add code to allow draw window to popup as soon
as it is entered in compact mode. Also force
the two windows to be reasonably
well-separated (>125 pixels if possible).
- Start to move some of the event handling
routines out.
- Separate definition of symbol from joining
method and provide extra symbols.
- Move the restoration of the plot state to a
"KILL_NOTIFY" procedure (keep the state in
common block - not ideal). Also make the two
windows of compact mode mutually destroy each
other.
- Make the generation code of GRAFFER into
GRAFFER_ONE, thus eliminating a goto and
saving some code duplication. Actually
implement the GROUP key which always existed
but doesn't appear to have been implemented.
- Add new dataset property to define mouse
editability (so that it is possible to shut
out the possibility of accidentally changing a
data set). Move that along with sorting &
clipping into a "Extras" pulldown in the
dataset menus. Also make the dataset selection
menus into a 1-liner.
- Modify fit dataset to make it safer and to
return to "system" versions of routines.
- Add a "changed" indicator in a suitable bit of
unused space.
- Fix compact mode event generation so that the
menu panel auto-exposes properly?
- Add a system for putting a key on the
plot. Also in the process invent "Frame"
coordinates (like normalized but measured
relative to the corners of the axis box rather
than the viewport). Make this system available
for anchoring text as well.
- Add "piecewise linear" fits to the "Fit
dataset" options.
- Add a CAPTURE_INPUT key to GRAFF_ENTER and use
it in most input situations.
- Extensive reconstruction of GR_PICKFILE to
make it look & feel more like the rest of GRAFFER.
- Improve the autosave facility in several ways:
- Big operations (e.g. editing a dataset)
count as more than one operation.
- The handling of the files if improved so
that a prompt is given if the requested
operation isn't what GRAFFER thinks you
should do.
- The flagging of deleting the autosave file
is fixed.
- Add new key option.
- Fix problem with unidentified tags in binary
files.
Version 2.01:
- Add space for a general comment on the plot.
- Add GRAFF_PROPS to allow programs to set
global values (e.g. axis ranges, titles etc.)
Version 2.02:
- Make Ndata fields LONG.
- Modify file picker to prevent duplicated
directory name being returned in some cases.
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graffer.pro)
GRAFF_ADD
User-callable interface to add a dataset to a graffer file.
Usage:
graff_add, file, [[[z], x,] y, errors=errors, funcx=funcx, $
funcy=funcy, errtype=errtype, funcz=funcz, $
polar=polar, rescale=rescale, /display, join=join, $
style=style, psym=psym, symsize=symsize, colour=colour, $
thick=thick, neval=neval, description=description, $
frange=frange, /graffer, /ascii, /noclip, $
mouse=mouse]
Arguments:
file string input The graffer file to modify.
z float input The Z values for a 2-D dataset (If
only 2 arguments are present, then
they are treated as X & Y)
x float input The x values to add.
y float input The y values to add.
Keywords:
errors float input Array with errors, 1-d or (m,n).
errtype string input Specify error types as code
(e.g. "XXY" for asymmetrical errors in
X and symmetric errors in Y)
funcx string input Function specification for x = f(y) or
x = f(t)
funcy string input Function specification for y = f(x) or
y = f(t)
funcz string input Function specification for z = f(x,y)
frange float input The range of x, y or t over which to
plot a function
polar int input If unset or 0 rectangular, 1 = polar
in radians, 2 = polar in degrees.
rescale input If set, then reset the scaling of the
plot with the autoscale routine.
display input If set, then display the plot on the
current device.
style int input The standard IDL linestyle codes
psym int input The GRAFFER symbol code - extended IDL
symbol
codes.
join int input The style of joining: 0 - none
1 - sloping lines
2 - histogram
symsize float input The size for the symbols (relative to
standard)
colour int input Colour number - standard GRAFFER
colours (which may
well not work on
current device).
thick int input Line thickness.
neval int input The number of times to evaluate a
function. (2-elements for funcz)
description str input A description of the data set.
sort input Whether to sort the values on the X
axis.
graffer input If set, then invoke GRAFFER after
adding the dataset.
ascii input If set, then save as an ASCII GRAFFER
file (by default a binary graffer file
is generated).
noclip input If set, then disable clipping to the
axis box.
mouse int input If explicitly set to zero then
disable mouse-editing of the dataset.
Restrictions:
The func keys and the x,y,z arguments are exclusive.
The GRAFFER key overrides the DISPLAY key and the ASCII key.
The setting of display options for 2-D data & functions is not
yet suppported
Side Effects:
A graffer file is updated or created.
The DISPLAY option will cause your device colour table to be
changed.
History:
Original: 13/8/96; SJT
Fix counting problem for new file: 13/9/96; SJT
Add GRAFFER key: 18/9/96; SJT
Add support for 2-D datasets: 20/12/96; SJT
Support index for X (i.e. filename & 1 arg): 9/1/97; SJT
Add ascii key: 15/1/97; SJT
Add mouse-editing default option: 13/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_add.pro)
GRAFF_CH_DSET Change data set Usage: graff_ch_dset, pdefs Argument: pdefs struct in/out The plot definition structure. History: Original (essentially a widget version of graff_dset): 7/9/95; SJT Add mouse-editing default option: 13/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_ch_dset.pro)
GRAFF_CLEAR Release memory from handles in a Graffer plot structure Usage: graff_clear,pdefs Argument: pdefs struct in/out The graffer control structure Note: The structure is not usable after clearing until re-initialised History: Extracted from GRAFF_EVENT: 18/8/95; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_clear.pro)
GRAFF_COLOURS Sets up the colour table for graffer. Usage: graff_colours, pdefs ; Not indended for use by the user. Argument: pdefs struct input GRAFFER control structure (only colour table is used Side Effects: The colour table is updated. Table is W, Bla, R, G, B, Cy, Ma, Ye, Or, (G+Ye), (G+Cy), (B+Cy), (B+Ma), (R+Ma), Dark Grey, Light Grey. History: Original: 2/8/95; SJT Rename as GRAFF_COLOURS (was s_colours): 18/9/96; SJT Don't do extended colour table if not enough colours: 8/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_colours.pro)
GRAFF_DECODE_XY Decode an array of X-Y[-err-err] values Usage: data = graff_decode_xy(txt,nt) Return Value: data float (nt x m) array of values & errors (nt = 2, 3 or 4) Arguments: txt string input String array of data values. 1 element for each value with x y and optionally 1 or 2 error limits. The x value may be a time in the form h:m:s. nt int output The number of fields in each element. History: Original: 29/7/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_decode_xy.pro)
GRAFF_DRAW Process a draw event in draw mode Usage: ichange = graff_draw(pdefs, event, track_flag) Argument: pdefs struct in/out The plot definition structure. event struct input The draw event that triggered this track_flag byte input A flag to say if it's a tracking event. History: Carved from graffer: 17/8/95; SJT Modify to cope with function data (by ignoring it): 18/8/95; SJT Add tracking event handling: 5/12/95; SJT Handle data with error bars: 28/11/96; SJT Made to function returning "cancel" state: 18/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_draw.pro)
GRAFF_DSDEL Delete the current data set. Usage: graff_dsdel, pdefs Argument pdefs struct input The graffer structure, needed if save requested. History: Original: 29/8/95; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_dsdel.pro)
GRAFF_DUMP Dump the contents of the draw widget to an image file. Usage: graff_dump, pdefs[,] Argument: Pdefs struct input The graffer data structure (only used for file and dir) Keywords: gif Save as a GIF (Graphical interchange format) file tiff Save as a TIFF (Tagged image file format?) file nrif Save as an NRIF (NCAR raster image format) file Restrictions: Only one keyword may be given, also only default options are supported for the more general file types. History: Original: 8/9/95; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_dump.pro)
GRAFF_ENTER A labeled text entry field Usage: id = graff_enter(parent, ...) Return: id long The ID of the compound widget Argument: parent long input The ID of the base in which the widget will sit. Keywords: label string input The label to be attached to the entry box value ... input The initial value of the widget uvalue ... input A user-value for the compound. floating input If set then the values are floating point integer input If set then the values are short integers long_int input If set then the values are long integers text input If set, then the values are text strings (default action) format string input The format for displaying the value. xsize int input The size of the text input box (chars) ysize int input The number of rows in the box column input If set then put the label above the text box (default is to the left) frame input If set, then put a box around the whole compound box input If set, then put a box around the text field. all_events input If set, then return all events except selection events no_event input If set, then don't return events at all. select_events input If set and all_events is set, then even return selection events tracking_events input If set, then enable cursor tracking events in the text window. capture_focus input If set, then putting the cursor into the text-box gives the focus to the widget. array_valued input If set, then the widget can accept & return an array of values (normally only scalar values are accepted) scroll input If set then make the text widget a scrolling widget. graphics input If set and this is a text input box, don't return strings ending in a single pling "!" (To avoid hershey character errors). Restrictions: If the text window does not contain a valid value for the given type, then the null string is returned by a get_value call. History: Original: 25/8/95; SJT use decoders rather than internal reads: 29/8/95; SJT Add tracking_events key: 4/12/95; SJT Add array_valued and scroll keys: 9/12/96; SJT Modify handler so tracking events can be returned by "non-editable" or "non-event" widgets: 14/1/97; SJT Add CAPTURE_FOCUS key: 6/2/97; SJT Add GRAPHICS key: 12/2/97; SJT Put in "event backlog" trapping to prevent the multiple updating of the plot when a title is typed rapidly: 3/7/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_enter.pro)
GRAFF_FNAME Get a graffer filename Usage: file = graff_fname(topid, ifile, dir) Return: file string The filename (graffer.grf if null) Arguments: topid long input Widget ID of group leader ifile string input Initial value of file name in widget dir string in/out Directory where the file is to be found use_timer byte input Whether to use the timer events to keep it on top History: Original: 18/8/95; SJT Add timer event to push to front if obscured: 23/8/95; SJT Add file & dir arguments: Sep 95; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_fname.pro)
GRAFF_FUNCT Define a function to graffer. Usage: ichange=graff_funct(pdefs) Return value: ichange int 1 if the DO button was used, 0 if cancel Argument: pdefs struct in/out The Graffer plot structure History: Original: 6/8/95; SJT Add timer event to push to front if obscured: 23/8/95; SJT Made to function returning "cancel" state: 18/12/96; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_funct.pro)
GRAFF_GET Get a graffer dataset from a file Usage: iopen = graff_get(pdefs[, f]) Return Value: iopen int 1 If file was opened; 0 if not. Argument: pdefs struct in/out The graffer data structure. f string input The file to read. Keywords: no_set input If set, then don't try to set up the widget values (because the widgets aren't there) recover input If set, then try to recover the file from the autosave file no_warn input If set, then don't print a warning message if file is not opened sucessfully. previous_name string input The name of the last file opened. History: Original: 16/8/95; SJT Remove file argument (use pdefs.name): 17/8/95; SJT Add facilities for string-type data and restore filename: 18/8/95; SJT Change to a function returning 0 or 1 & add NO_WARN key: 11/6/96; SJT Reduce to a wrapper for an ASCII and a binary mode reader: 14/1/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_get.pro)
GRAFF_HARD Make a hardcopy Usage: ichange = graff_hard(pdefs) Return value ichange int 1 if changed, 0 if not Argument: pdefs struct in/out The plot definition structure. Keyword: no_set input If set and non-zero, then don't call gr_hardopts to set up the options. History: Carved from graffer: 17/8/95; SJT Added no_set key: 8/9/95; SJT Made to function returning "cancel" state: 18/12/96; SJT Change STRPOS to RSTRPOS in filename generation: 23/3/98; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_hard.pro)
GRAFF_INIT Set up a new graffer plot structure Usage: graff_init, pdefs Argument: pdefs struct output The graffer plot structure. file string input The filename for the new plot. Keywords: version int input The graffer version 2-elements, major & minor version numbers, if pdefs exists, then previous version is retained. Note: If pdefs exists, it is assumed to be a pre-existing pdefs structure and its associated handles are released. History: Extracted from GRAFFER: 18/8/95; SJT Axis style IDS added: 17/1/97; SJT Modify for extended symbol definitions: 20/1/97; SJT Drop CDF support: 10/2/97; SJT Add flag for short colour table: 8/5/97; SJT Add flag for "single point" key format: 15/5/97; SJT Add REM(arks) field: 23/6/97; SJT Several bug fixes to .grafferrc handling: 24/7/97; SJT Add mouse-editing default option: 13/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_init.pro)
GRAFF_JUST Set "non-standard" text justification Usage: align = graff_just(initial, group=group) Return Value: align float The new justification setting Argument: initial float input The previous justification setting use_timer byte input Whether to use the timer events to keep it on top Keyword: group long input The widget ID of the caller. History: Original: 5/10/95; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_just.pro)
GRAFF_MSG Display a message in the graffer message box Usage: graff_msg, mwid, message Arguments: mwid long input Widget ID of message box message string input The message History: Original: 18/8/95; SJT Change to take widget ID as first argument: 12/5/95; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_msg.pro)
GRAFF_ONE Define a full-sized screen for graffer. Usage: (May not be called directly by the user) graff_one, pdefs, group=group, xsize=xsize, ysize=ysize Argument: pdefs struct in/out A GRAFFER control structure as returned by the graff_init procedure. base long output The ID of the base to be managed by XMANAGER Keywords: group long input The group leader of the widget tree. xsize int input The x dimension of the draw widget ysize int input The y dimension of the draw widget Restrictions: May not be called directly by the user. This routine uses much of the startup code and the same event handler as the normal GRAFFER procedure. Therefore it checks and gives a fatal error if its caller isn't GRAFFER (Of course you CAN trick it but as the saying is you can make software foolproof, but you can't make it damnfoolproof). History: Original (extracted from GRAFFER): 23/1/97; SJT Add "changed" indicator: 29/1/97; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_one.pro)
GRAFF_PFUNCT Define a parametric function to graffer. Usage: ichange=graff_pfunct(pdefs) Return value: ichange int 1 if the DO button was used, 0 if cancel Argument: pdefs struct in/out The Graffer plot structure History: Original (after graff_funct): 5/10/95; SJT Made to function returning "cancel" state: 18/12/96; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_pfunct.pro)
GRAFF_PROPS
User-callable interface to set global properties of a graffer
file.
Usage:
graff_props, file, title=title, subtitle=subtitle, $
charsize=charsize, thick=thick, corners=corners, $
aspect=aspect, comment=comment, xtitle=xtitle, $
xrange=xrange, xlog=xlog, xexact=xexact, $
xextend=xextend, xaxes=xaxes, xbox=xbox, $
xminor=xminor, xtime=xtime, xorigin=xorigin, $
xgrid=xgrid, xauto=xauto, $
ytitle=ytitle, $
yrange=yrange, ylog=ylog, yexact=yexact, $
yextend=yextend, yaxes=yaxes, ybox=ybox, $
yminor=yminor, ytime=ytime, yorigin=yorigin, $
ygrid=ygrid, yauto=yauto, display=display, $
graffer=graffer, ascii=ascii
Argument:
file string input The graffer file to modify.
Keywords:
title input Set the plot title.
subtitle input Set the subtitle for the plot.
charsize input Set the character size to be used for
axis labelling and plot annotations.
thick input Set the line thickness to be used for
drawing the axes.
corners input Set the location of the plot in
normalized coordinates by specifying
the locations of the corners
(4-elemant array [x0,y0, x1,y1])
aspect input Set the location of the plot within
the normalized coordinate system by
aspect ratio and margin (2-element
array [aspect, margin]
N.B. Specifying both ASPECT &
CORNERS is an error and the
plot location is unchanged.
comment input Set a descriptive comment for the
whole file. (String array)
[xy]title input Set the title for the specified axis.
[xy]range input Set the range of the specified axis
(2-element array).
[xy]log input Set or unset the use of logarithmic
axes.
[xy]exact input Set or unset the exact range bit of
the IDL axis style setting
[xy]extend input Set or unset the extended range bit of
the IDL axis style setting
[xy]axes input Set or unset the axis plotting bit of
the IDL axis style setting.
[xy]box input Set or unset the "box-axis" bit in the
IDL axis style setting
[xy]minor input If set, then display minor ticks on
the plot; if explicitly zero, then
turn off the minor ticks.
[xy]time input If set to zero, then turn off time
labelling, otherwise this must be a
structure with the following members:
unit: - 0 == seconds
- 1 == minutes
- 2 == hours
- 3 == days
Gives the unit in which the
time is expressed in the axis data.
max_unit: gives the largest unit to
display on the plot (same code as
for unit)
zero: gives the value to be used for
the zero of the axis (expressed in
units of max_unit
[xy]origin input If set, then plot an axis at the origin.
[xy]grid input Make a grid from the major ticks,
using linestyle n-1 (0 == no grid).
[xy]auto input If set, then perform an autoscale on
the specified axis, the corresponding
range setting takes precedence over
this setting.
display input If set, then display the plot on the
current device.
graffer input If set, then invoke GRAFFER after
adding the dataset.
ascii input If set, then save as an ASCII GRAFFER
file (by default a binary graffer file
is generated).
h_orient input Set landscape(0) or portrait (1)
orientation of the page.
h_colour input Set or unset the generation of a
colour (E)PS file.
h_eps input Set or unset the generation of EPS
file rather than PS (N.B. if h_eps is
set and h_orient is not specified,
then h_orient=1 is implied).
h_[xy]size input Set the X(Y) dimension of the page in cm
h_[xy]margin input Set the X(Y) offset of the page from
the lower-left corner of the page.
Restrictions:
The ASPECT and CORNERS keys are exclusive (if both are given,
both are ignored).
[XY]RANGE overrides [XY]AUTO.
The GRAFFER key overrides the DISPLAY key and the ASCII key.
As yet the addition/modification of a key (legend) is not
supported.
Not all hardcopy options can be set.
Side Effects:
A graffer file is updated or created.
The DISPLAY option will cause your device colour table to be
changed.
History:
Original (uses some code from GRAFF_ADD): 12/3/98; SJT
Added hardcopy settings: 13/3/98; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_props.pro)
GRAFF_RESCALE Rescale the current GRAFFER dataset Usage: ichange = graff_rescale(pdefs) Return value ichange int 1 if changed, 0 if not Argument: prefs struct input The GRAFFER data & control structure. History: Original: 16/8/96; SJT Made to function returning "cancel" state: 18/12/96; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_rescale.pro)
GRAFF_SET_VALS Setup the values of the graffer widgets Usage: graff_set_vals, pdefs Argument: pdefs struct input The graffer control structure Keyword: set_only input If set, then only do those values which change with the current data set History: Original: 18.8.95; SJT Add Mode: 12/8/96; SJT Add settings of the styles: 17/1/97; SJT Modify for extended symbol definitions: 20/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_set_vals.pro)
GRAFF_SORT_DSS Change data set Usage: graff_sort_dss, pdefs Argument: pdefs struct in/out The plot definition structure. History: Original (after graff_ch_dset): 6/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_sort_dss.pro)
GRAFF_S_PROMPT Do you really want to destroy what you just did? Usage: ido = graff_s_prompt(pdefs) Return: ido int Do I go on? Argument pdefs struct input The graffer structure, needed if save requested. History: Original: 18/8/95; SJT Add input focus to SAVE button: 22/8/95; SJT Add options for binary or ascii save: 15/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_s_prompt.pro)
GRAFF_TEXT Add text to a graffer plot. Usage: ichange = graff_text(pdefs) Return value ichange int 1 if changed, 0 if not Argument: pdefs struct in/out Structure containing all the info about the plot. History: Original: 16/8/95; SJT Add timer event to push to front if obscured: 23/8/95; SJT Add a tracker help window like that in the main panel: 9/8/96; SJT Add a cancel button: 13/9/96; SJT Modify to display the text in a window on the pop-up (for speed of response with complex plots): 6/11/96; SJT Made to function returning "cancel" state: 18/12/96; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_text.pro)
GRAFF_TLV
Construct a graffer data set from top-level variables
Usage:
ichange = graff_tlv(pdefs)
Return value
ichange int 1 if changed, 0 if not
Argument:
pdefs struct in/out The graffer control/data structure
WARNING:
This routine uses the undocumented IDL internal ROUTINE_NAMES
to recover values -- it is possible that this could cease to
work in later IDL releases - though I hope it won't.
History:
Original: 21/9/95; SJT
Add x=findgen(ny) when no X variable given: 28/10/96; SJT
MOve GRF_TLV_GET to a separate file: 6/12/96; SJT
Made to function returning "cancel" state: 18/12/96; SJT
Add CAPTURE key to entry boxes: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_tlv.pro)
GRAFF_TWO Define a more compact screen for graffer. Usage: (May not be called directly by the user) graff_two, pdefs, group=group, xsize=xsize, ysize=ysize Argument: pdefs struct in/out A GRAFFER control structure as returned by the graff_init procedure. base long output The ID of the base to be managed by XMANAGER Keywords: group long input The group leader of the widget tree. xsize int input The x dimension of the draw widget ysize int input The y dimension of the draw widget Restrictions: May not be called directly by the user. This routine uses much of the startup code and the same event handler as the normal GRAFFER procedure. Therefore it checks and gives a fatal error if its caller isn't GRAFFER (Of course you CAN trick it but as the saying is you can make software foolproof, but you can't make it damnfoolproof). History: Original (derived from GRAFFER): 5/6/96; SJT Add CDF, & Autoscale options to the pulldowns: 9/8/96; SJT Add options for "Origin" axes and polar plots: 12/8/96; SJT Add extra Dataset buttons: 13/9/96; SJT Start to farm out menu panels to procedures: 29/11/96; SJT More farming and put the plot window in an independent base as per the suggestion of Phil Williams (Childrens Hospital Medical Center Cincinnati): 6/12/96; SJT Make top-level base "tracking" to allow auto-pop. Also ensure that the two windows are reasonably well-separated: 17/1/97; SJT Add "changed" indicator and solve problem of making menu window auto-pop: 29/1/97; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_two.pro)
GRAFF_WRITE Process a draw event in text mode Usage: ichange = graff_write(pdefs, event, track_flag) Return value ichange int 1 if changed, 0 if not Argument: pdefs struct in/out The plot definition structure. event struct input The draw event that triggered this track_flag byte input A flag to say if it's a tracking event. History: Carved from graffer: 17/8/95; SJT Add tracking event handling: 5/12/95; SJT Made to function returning "cancel" state: 18/12/96; SJT Change to plot crosshairs in normalized coords: 27/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_write.pro)
GRAFF_ZFUNCT Define a 2-D function to graffer. Usage: ichange = graff_zfunct(pdefs) Return value: ichange int 1 if the DO button was used, 0 if cancel Argument: pdefs struct in/out The Graffer plot structure History: Original (after GRAFF_FUNCT): 10/12/96; SJT Made to function returning "cancel" state: 18/12/96; SJT Add CAPTURE key to text inputs: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/graff_zfunct.pro)
GRF_TLV_GET Get a variable from the top level. Usage: var = grf_tlv_get(vn, n_var) Return value: var any The value or array of values returned from the top level. Arguments: VN string input the variable name to get including possible slice information N_VAR int output the number of elements returned. Method: Uses the undocumented ROUTINE_NAMES intrinsic function to get the requested variable. History: Original: 21/9/95; SJT Moved to its own file to allow use in multiple input routines: 6/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/grf_tlv_get.pro)
GR_1DD_PLOT Plot a 1-D Data in graffer Usage: gr_1dd_plot, pdefs, i Argument: pdefs struct input The Graffer control structure. i int input Which History: Farmed out from GR_PLOT_OBJECT: 10/12/96; SJT Modify for extended symbol definitions: 20/1/97; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_1dd_plot.pro)
GR_1DF_PLOT Plot a 1-D function in graffer Usage: gr_1df_plot, pdefs, i Argument: pdefs struct input The Graffer control structure. i int input Which History: Farmed out from GR_PLOT_OBJECT: 10/12/96; SJT Modify for extended symbol definitions: 20/1/97; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_1df_plot.pro)
GR_2DD_PLOT Plot a 2-D Data in graffer Usage: gr_2dd_plot, pdefs, i Argument: pdefs struct input The Graffer control structure. i int input Which csiz float input Charsize scaling (hardcopy only). Keyword: grey_ps input If set & non-zero, then the plot is to a PS device without the COLOUR option. History: Original: 10/12/96; SJT Made unique in 8.3: 11/2/97; SJT Skip if inadequate colours: 8/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_2dd_plot.pro)
GR_2DF_PLOT Display a 2-d function in GRAFFER Usage: gr_2df_plot, pdefs, i Argument: pdefs struct input The Graffer control structure. i int input Which csiz float input Charsize scaling (hardcopy only). Keyword: grey_ps input If set & non-zero, then the plot is to a PS device without the COLOUR option. History: Original: 10/12/96; SJT Made unique in 8.3: 11/2/97; SJT Skip if inadequate colours: 8/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_2df_plot.pro)
GR_ANG_PTS Get all the points of polar dataset (with possible error bars) Usage: gr_ang_pts, xydata, ndata, type, r, t Arguments xydata float input The data array. ndata int input The numer of values in it. type int input Interpretation of error bars. r float output The output R values t float output The output theta values History: Original: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_ang_pts.pro)
GR_APPEND Append one dataset to another optionally deleting the appended dataset. Usage: gr_append, pdefs, n1, n2[, /delete, /sort] Arguments: pdefs struct in/out The GRAFFER data structure. n1 int input The index number of the appendee. n2 int input The index number of the dataset to be appended. Keywords: delete ?? input If set and non-zero, then delete the dataset that was appended. sort ?? input If set and non-zero, then sort the X-axis of the combined dataset. History: Original: 11/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_append.pro)
GR_APP_W Menu to control GR_APPEND Usage: gr_app_w, pdefs Argument: pdefs struct in/out The GRAFFER data structure History: Original: 12/11/96; SJT Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_app_w.pro)
GR_ASC_SAVE Save a graffer dataset to a file Usage: gr_asc_save, pdefs Argument: pdefs struct input The graffer data structure. History: Original: 16/8/95; SJT Remove file argument (use pdefs.name): 17/8/95; SJT Add facilities for string-type data: 18/8/95; SJT Add auto-save: 22/9/95; SJT Complete rewrite for new (V2) file organization should facilitate future extensions without some of the ghastly coding needed to (say) read 1.04 files with 1.05 program: 1/11/96; SJT Rename as GR_ASC_SAVE: 14/1/97; SJT Drop CDF support: 10/2/97; SJT Made unique in 8.3: 11/2/97; SJT Add REM(arks) field: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_asc_save.pro)
GR_AS_XA Autoscale graffer data (X-Axis, rectangular plot) Usage: gr_as_xa, data, range Arguments: data struct input The Graffer data structure (extracted from PDEFS) xrange float input The x- range for functions (th=f(r)) yrange float input The y- range for functions (r=f(th)) range float in/out The range to use. History: Extracted from GR_AUTOSCALE: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_as_xa.pro)
GR_AS_XR Autoscale graffer data (X-Axis, rectangular plot) Usage: gr_as_xr, data, range Arguments: data struct input The Graffer data structure (extracted from PDEFS) yrange float input The Y- range for functions (x=f(y)) ytype int input log or linear Y (ditto) range float in/out The range to use. History: Extracted from GR_AUTOSCALE: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_as_xr.pro)
GR_AS_YA Autoscale graffer data (Y-Axis, rectangular plot) Usage: gr_as_ya, data, range Arguments: data struct input The Graffer data structure (extracted from PDEFS) xrange float input The x- range of plot for functions th=f(r)) yrange float input The theta- range for functions (r=f(th)) range float in/out The range to use. History: Extracted from GR_AUTOSCALE: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_as_ya.pro)
GR_AS_YR Autoscale graffer data (Y-Axis, rectangular plot) Usage: gr_as_xr, data, range Arguments: data struct input The Graffer data structure (extracted from PDEFS) xrange float input The X- range for functions (y=f(x)) xtype int input log or linear X (ditto) range float in/out The range to use. History: Extracted from GR_AUTOSCALE: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_as_yr.pro)
GR_AUTOSCALE Autoscale a GRAFFER axis to its data. Usage: gr_autoscale, pdefs, [/xaxis|/yaxis] Arguments: pdefs struct in/out The GRAFFER data structure Keywords: xaxis ? input If set scale the X-axis yaxis ? input If set scale the Y-axis ignore ? input If set, then disregard the current settings altogther, the default is only to extend axis ranges. History: Original (borrowing much code from PLOT_OBJECT): 9/8/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_autoscale.pro)
GR_AUTO_DELETE Delete a GRAFFER autosave file. Usage: gr_auto_delete, pdefs Argument: pdefs struct input The GRAFFER data structure. History: Original (out of GRAFF_EVENT): 9/10/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_auto_delete.pro)
GR_AXIS_MENU Make up an axis options menu for GRAFFER Usage: gr_axis_menu, axis, base, pdefs Arguments: axis char input "X" or "Y" to say which axis it is. base long input Widget ID of the parent base. pdefs struct in/out The GRAFFER control & data structure. History: Extracted: 6/12/96; SJT Change to "Stated" pulldown & Move event handler here (to try and reduce the size of the EH in GRAFFER): 17/1/97; SJT Add CAPTURE key to entry boxes: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_axis_menu.pro)
GR_BIN_DS Read an individual dataset from a binary V2.x GRAFFER file. Arguments: data struct in/out The graffer dataset structure nset int input The serial number of the current dataset. ilu int input File unit number to read msgid long input ID of message window (if created). version float input Version of dataset begin read. History: Original (binary version): 15/1/97; SJT Add version argument: 14/5/99; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_bin_ds.pro)
GR_BIN_SAVE Save a graffer dataset to a file in binary format Usage: gr_bin_save, pdefs Argument: pdefs struct input The graffer data structure. Keyword: auto input If set & non-zero, then this is an autosave. History: Original: (from GR_SAVE_ASC) 14/1/96; SJT Drop CDF support: 10/2/97; SJT Made unique in 8.3: 11/2/97; SJT Add REM(arks) field: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_bin_save.pro)
GR_BIN_TXT Read an individual Text string from a binary V2.x GRAFFER file. Arguments: text struct in/out The graffer text string structure nset int input The serial number of the current dataset. ilu int input File unit number to read msgid long input ID of message window (if created). Keyword: template input If set, then we are getting a template not a full text string. History: Original (binary version): 15/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_bin_txt.pro)
GR_BYT_RD Read byte value(s) from a binary GRAFFER file Usage: val = gr_byt_rd(ilu, nvals) Return value: val byte The required byte Arguments: iunit int input The IDL file unit number nvals int input How many? History: Original: 15/1/97; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_byt_rd.pro)
GR_BYT_VAL Return byte value associated with a tag Return value: value byte The value associated with the tag. Arguments: tag_val string input The string containing the tag value. num int input How many elements the value has. History: Original: 5/11/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_byt_val.pro)
GR_CF_PIECES A Procedure interface to GR_PIECES to keep CURVEFIT happy! As we don't know which will get called first they have to be in separate files!
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_cf_pieces.pro)
GR_CHECK_BOX Read the bitmap for the checkbox image. Usage: bitmap=gr_check_box(nx,ny) Return Value: bitmap byte The bitmap Arguments: nx, ny int output The size of the bitmap History: Original: 29/1/97; SJT Just return the bitmap: 20/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_check_box.pro)
GR_COMMENT Add a "general" comment to the plot file. This comment is not displayed anywhere, it's just an arbitrary piece of text for you to use as you wish. Usage: ichange=gr_comment(pdefs) Argument: pdefs struct in/out The Graffer control structure. History: Original: 1/7/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_comment.pro)
GR_CONTROL_MENU Make the main control menu for graffer. Usage: gr_control_menu, base Argument: base long input The widget ID of the parent base. History: Extracted from GRAFFER (& Help button added for X): 18/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_control_menu.pro)
GR_CONT_MENU Make the menu to set the properties of a contoured ds. Usage: gr_cont_menu, pdefs, data Arguments: pdefs struct input The Graffer data & control structure. data struct in/out The data structure extracted from pdefs History: Original: 9/12/96; SJT Sort the levels: 16/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_cont_menus.pro)
GR_DISPLAY_IMG Colour/greyscale image display for GRAFFER Usage: gr_display_img, zin, xin, yin, range=range, $ colour_range=colour_range pixel_size=pixel_size Arguments: zin float input The data to be displayed xin float input The X coordinates of the data. yin float input The Y coordinates of the data. Keywords: range float input The range from "black" to "white" colour. int input The range of colour indices to use. pixel. float input For devices with scalable pixels, the size of a displayed pixel. History: Original: 10/12/96; SJT Add code to clip to the viewport: 12/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_display_img.pro)
GR_DISP_MAN Usage: gr_disp_man Keyword: initialise input If set & non-zero, then initialize the system otherwise display help. History: Original: 19/12/96; SJT Modify reading of help file to speed it up: 18/3/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_disp_man.pro)
GR_DS_CREATE Make the pulldown menu to define &| edit a dataset. Usage: gr_ds_create, base Argument: base long input The ID of the parent base History: Pulled out of GRAFFER: 9/12/96; SJT Moved event handling in: 17/1/97; SJT Drop CDF support: 10/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_ds_create.pro)
GR_DS_MENUS Make the menu to set the properties of an XY dataset Usage: gr_ds_menus, optbb, pdefs Arguments: optbb long input The widget ID of the parent base pdefs struct in/out The Graffer data & control structure. History: Farmed out from GRAFFER to facilitate maintenance: 6/12/96; SJT Moved event handler in: 17/1/97; SJT Modify for extended symbol definitions + add compact key: 20/1/97; SJT Add CAPTURE key to entry boxes, remove compact key: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_ds_menus.pro)
GR_DS_PULLDOWN Dataset selection pulldown Usage: gr_ds_pulldown, base Argument: base long input The ID of the parent base. History: Extracted from GRAFFER: 9/12/96; SJT Move event handler here: 17/1/97; SJT Reduce size by putting erase & delete under "Other": 27/1/97; SJT Add mouse-editing default option: 13/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_ds_pulldown.pro)
GR_FILE_EXIST Checks if a file exists (is readable). Usage: ok = gr_file_exist(file) Return value: ok int 1 if the file exists, 0 if it doesn't. Argument: file string input The name (path) of the putative file. History: Original: 16/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_file_exist.pro)
GR_FIT_DSET Select a data set to do a least-squares fit. Usage: ichange = graff_ch_dset(pdefs) Return value: ichange int 1 if the DO button was used, 0 if cancel Argument: pdefs struct input The plot definition structure. History: Original (from GRAFF_CH_DSET): 28/8/96; SJT Modify to support median fits and simplify internal representations: 23/9/96; SJT Change to make this the outer routine & allow higher degree fits: 22/11/96; SJT Shorten name: 25/11/96; SJT Made to function returning "cancel" state: 18/12/96; SJT Add options to do "piecewise linear" fits: 4/2/97; SJT Reorganize to give neater layout: 5/2/97; SJT Add capture key to input boxes: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_fit_dset.pro)
GR_FIT_FUNCT Make a least squares fit to a dataset Usage: gr_fit_funct, pdefs Argument: pdefs struct in/out The GRAFFER plot structure. History: Original: 28/8/96; SJT Add support for median fits and simplify representation of fit types: 23/9/96; SJT Change to make this the inner routine & allow higher degree fits: 22/11/96; SJT Shorten name: 25/11/96; SJT Add CHECK error handling for fitting calls thus eliminating the need for local SVDFIT version and making safer: 29/1/97; SJT Add options to do "piecewise linear" fits: 4/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_fit_funct.pro)
GR_FLT_RD Read float value(s) from a binary GRAFFER file Usage: val = gr_flt_rd(ilu, nvals) Return value: val float The required float Arguments: iunit int input The IDL file unit number nvals int input How many? History: Original: 15/1/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_flt_rd.pro)
GR_FLT_VAL Return floating point value associated with a tag Return value: value float The value associated with the tag. Arguments: tag_val string input The string containing the tag value. num int input How many elements the value has. History: Original: 5/11/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_flt_val.pro)
GR_FRA2NORM Convert "Frame" coordinates to normalized coordinates Usage: gr_fra2norm, xf, yf, xn, yn Arguments: xf, yf float input X & Y coordinates in "Frame" system xn, yn float output X & Y coordinates in normalized system. Keyword: invert ?? input If set, then take normalized coordinates and return frame coords History: Original: 30/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_fra2norm.pro)
GR_FUN_READ Get a function from a data file Usage: ichange = gr_fun_read(pdefs) Return value: ichange int 1 if the DO button was used, 0 if cancel Argument: pdefs struct in/out The graffer plot structure. History: Original (after gr_xy_read): 17/12/96; SJT Made to function returning "cancel" state: 18/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_fun_read.pro)
GR_GET_ASC Get an ASCII graffer dataset from a file Usage: iopen = gr_get_asc(pdefs[, f]) Return Value: iopen int 1 If file was opened; 0 if not. Argument: pdefs struct in/out The graffer data structure. f string input The file to read. Keywords: no_set input If set, then don't try to set up the widget values (because the widgets aren't there) recover input If set, then try to recover the file from the autosave file no_warn input If set, then don't print a warning message if file is not opened sucessfully. History: Original: 16/8/95; SJT Remove file argument (use pdefs.name): 17/8/95; SJT Add facilities for string-type data and restore filename: 18/8/95; SJT Change to a function returning 0 or 1 & add NO_WARN key: 11/6/96; SJT Make this the ASCII only version GR_GET_ASC and make GRAFF_GET a wrapper: 14/1/96; SJT Drop CDF support: 10/2/97; SJT Add REM(arks) field: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_asc.pro)
GR_GET_BIN Get an BINARY graffer dataset from a file Usage: iopen = gr_get_bin(pdefs[, f]) Return Value: iopen int 1 If file was opened; 0 if not. Argument: pdefs struct in/out The graffer data structure. f string input The file to read. Keywords: no_set input If set, then don't try to set up the widget values (because the widgets aren't there) resave input If set, then save the file again (i.e. autosave file) no_warn input If set, then don't print a warning message if file is not opened sucessfully. History: Original: (from GR_GET_ASC) 15/1/96; SJT Drop CDF support: 10/2/97; SJT Fix bad tag problem (I hope): 19/5/97; SJT Add REM(arks) field: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_bin.pro)
GR_GET_DS Read an individual dataset from a V2.x GRAFFER file. Arguments: data struct in/out The graffer dataset structure nset int input The serial number of the current dataset. ilu int input File unit number to read msgid long input ID of message window (if created). version float input Version of dataset begin read. History: Original: 5/11/96; SJT Shorten name: 25/11/96; SJT Add version argument: 14/5/99; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_ds.pro)
GR_GET_FULL_DIR Get the full pathname of a directory Usage: path = gr_get_full_dir(dir) Return value: path string The full pathname of the specfied directory Argument: dir string input The directory to be interpreted. History: Original: 17/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_full_dir.pro)
GR_GET_TXT Read an individual Text string from a V2.x GRAFFER file. Arguments: text struct in/out The graffer text string structure nset int input The serial number of the current dataset. ilu int input File unit number to read msgid long input ID of message window (if created). Keyword: template input If set, then we are getting a template not a full text string. History: Original: 5/11/96; SJT Shorten name: 25/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_txt.pro)
GR_GET_V1 Get a V1.x graffer dataset from a file Usage: graff_get, pdefs, ilu Arguments: pdefs struct in/out The graffer data structure. ilu long input The unit number from which to read. file_v float input The version of the input file. History: Original: 16/8/95; SJT Remove file argument (use pdefs.name): 17/8/95; SJT Add facilities for string-type data and restore filename: 18/8/95; SJT Change to a function returning 0 or 1 & add NO_WARN key: 11/6/96; SJT Rename as GRAFF_GET_V1; revert to procedure and modify to be called from V2 GRAFF_GET: 5/11/96; SJT Shorten name: 25/11/96; SJT Drop CDF support: 10/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_get_v1.pro)
GR_HARDOPTS Set hardcopy options Usage gr_hardopts, h ; Not intended for direct user usage Arguments: h struct in/out The hardcopy options. leader long input Group leader of the widget tname string input Name of the file without extension use_timer byte input Whether to use the timer events to keep it on top History: Original: 3/8/95; SJT Add timer event to push to front if obscured: 23/8/95; SJT Renamed as GR_HARDOPTS (was hardopts): 18/9/96; SJT Add font selection options: 10/10/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_hardopts.pro)
GR_IMG_MENUS Menu for setting options for "IMAGE" format display. Usage: gr_img_menus, pdefs, data Arguments: pdefs struct input The Graffer data & control structure. data struct in/out The data structure extracted from pdefs History: Original: 9/12/96; SJT Warn if inadequate colours: 8/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_img_menus.pro)
GR_INT_RD Read int value(s) from a binary GRAFFER file Usage: val = gr_int_rd(ilu, nvals) Return value: val int The required int Arguments: iunit int input The IDL file unit number nvals int input How many? History: Original: 15/1/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_int_rd.pro)
GR_INT_VAL Return int value associated with a tag Return value: value int The value associated with the tag. Arguments: tag_val string input The string containing the tag value. num int input How many elements the value has. History: Original: 5/11/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_int_val.pro)
GR_ISADIR Checks if its argument is a directory. Usage: ok = gr_isadir(dir) Return: 1 if it is, 0 if it isn't or isn't accessible by the user Argument: dir string input The putative directory to be tested History: Ripped straight out of PICKFILE and renamed: 16/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_isadir.pro)
GR_KEY_DEF Define the plotting of a key on the plot. Usage: ichange = gr_key_def(pdefs) Return value: ichange byte Flag indicating if change has been made Argument: pdefs struct in/out The GRAFFER universal structure History: Original: 30/1/97; SJT Changed to be function returning change flag: 30/1/97; SJT Add CAPTURE key to entry boxes: 6/2/97; SJT Modify to include "single point" format: 15/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_key_def.pro)
GR_LON_RD Read long value(s) from a binary GRAFFER file Usage: val = gr_lon_rd(ilu, nvals) Return value: val long The required long Arguments: iunit int input The IDL file unit number nvals int input How many? History: Original: 15/1/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_lon_rd.pro)
GR_LON_VAL Return long value associated with a tag Return value: value long The value associated with the tag. Arguments: tag_val string input The string containing the tag value. num int input How many elements the value has. History: Original: 5/11/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_lon_val.pro)
GR_MK_PLMENUS Make the panel for graffer's general plot settings Usage: gk_mk_plmenus, base, pdefs Arguments: base long input The ID of the parent widget. pdefs struct in/out The graffer control structure. Rationale: To make it easier to keep the compact and regular GRAFFER controls in step. History: Original (extracted from GRAFFER): 29/11/96; SJT Add CAPTURE key to entry boxes: 6/2/97; SJT Add "Comment" key: 1/7/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_mk_plmenus.pro)
GR_OPT_SET Set GRAFFER special options, e.g updating state etc. Usage: gr_opt_set, pdefs Argument: pdefs struct in/out The ubiquitous GRAFFER structure. History: Original: 4/7/97; SJT Add mouse-editing default option: 13/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_opt_set.pro)
GR_OVERWRT Do you want to overwrite an existing file? Usage: gr_overwrt, pdefs Argument pdefs struct input The graffer structure, needed if save requested. Keyword: default int input Which button to give the focus: 0 - no, 1 - yes History: Original (from GRAFF_S_PROMPT): 5/11/96; SJT Shorten name: 25/11/96; SJT Add options for binary or ascii save: 15/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_overwrt.pro)
GR_PIECES A piecewise straight line routine. Usage: y = gr_pieces(x, a) Return Value: y float The value of the function at the given X values. Arguments: x float input The values at which the function is required a float input The coeffieients of the function as explained below a(0) = y intercept of first segment a(1) = slope of first segment a(2(n-1)) = Start X of nth segment a(2(n-1)+1) = Slope of nth segment History: Original: 4/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pieces.pro)
GR_PLACE_WINDS Adjust the positioning of the two windows in comapct mode so they are reasonable well separated. Usage: gr_place_winds, pdefs Argument: pdefs struct input The GRAFFER master structure. History: Original: 17/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_place_winds.pro)
GR_PLOT_OBJECT Plots the plot specified by pdefs Usage: gr_plot_object, pdefs ; Not intended to be used directly by ; the user Argument: pdefs struct input The structure containing the plot definition Keyword: no_null input If set, then don't plot null text strings as "" charsize float input The character size to use as a multiplier to the pdefs sizes (for hardcopies) plot_all input If set, then don't supress 2-D plots even when this has been requested. grey_ps input If set & non-zero, then the plot is to a PS device without the COLOUR option. Side Effect: A plot is generated on the current device. History: Original: 2/8/95; SJT Add text handling: 16/8/95; SJT Add facilities for string-type data: 18/8/95; SJT Move log axis locks here: 22/8/95; SJT add charsize key: 4/9/95; SJT Change GR_ERRPLOT calls to allow use of limits: 11/6/96; SJT Add code to allow (a) addition of axes at the origin and (b) Polar plots: 12/8/96; SJT Use !{XY}.CRANGE for function limits: 29/8/96; SJT Rename as GR_PLOT_OBJECT (was plot_object): 18/9/96; SJT Add call to empty to force an update of the screen: 18/3/98; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_plot_object.pro)
GR_PL_AXES Plot axes for GRAFFER Usage: gr_pl_axes, pdefs, csiz[, /overlay] Argument: pdefs struct input The ubiqitous GRAFFER control structure csiz float input Charsize scaling (hardcopy only). Keyword: overlay ?? input If set, then don't erase before plotting (used to replace the ticks afer doing a colour plot). History: Cut from GR_PLOT_OBJECT and overlay added: 11/12/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pl_axes.pro)
GR_PL_KEY Plot a key to the plot. Usage: gr_pl_key, pdefs, csiz Argument: pdefs struct input The ubiquitous GRAFFER data & control structure csiz float input The character size to use History: Original: 29/1/97; SJT Made unique in 8.3: 11/2/97; SJT Fix problem when no datasets are selected: 21/2/97; SJT Modify to include "single point" format: 15/5/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pl_key.pro)
GR_PL_TEXT Plot text string in GRAFFER. Usage: gr_pl_text, text, csiz[, /no_null] Arguments: text struct input A GRAFFER text structure. csiz float input The character size to use as a multiplier to the pdefs sizes (for hardcopies) Keyword: no_null input If set, then don't plot null text strings as "" History: Extracted from GR_PLOT_OBJECT: 12/12/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pl_text.pro)
GR_POL_RECT Convert polar to rectangular coordinates. Usage: gr_pol_rect, r, th, x, y Arguments: r float input The radial coordinate th float input The angular coordinate (radians) x float output The resulting X coordinate y float output The resulting Y coordinate. History: Original: 16/12/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pol_rect.pro)
GR_POSITION Set the position of the corners of the plot Usage: ichange = gr_position(pdefs) Return value: ichange byte Flag indicating if change has been made Argument: pdefs struct in/out The GRAFFER control structure History: Original (made to be a pop-up): 12/12/96; SJT Changed to be function returning change flag: 30/1/97; SJT Add CAPTURE key to entry boxes: 6/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_position.pro)
GR_PSYM_BITM Define the bitmaps for the PSYM menu. Usage: gr_psym_bitm History: Original: 1/8/95; SJT Add byte-swap for little-endian machines: 7/8/96; SJT - following a suggestion from Christian Marquardt. Rename as GR_PSYM_BITM (was psym_bitmaps): 18/9/96; SJT Make a user-defined disk symbol & remove connected dots: 16/1/97; SJT Entirely rewritten to use new extended symbol range and to read the bitmaps from the bitmap files: 20/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_psym_bitm.pro)
GR_PWFIT Control use of CURVEFIT to make a piecewise linear fit to the dataset Usage: fit = gr_pwfit(x, y, w, nsg, c2) Return Value: fit float The fitted funtion expressed in terms of the GR_PIECES function Arguments: x float input The X values to be fitted y float input The Y values to be fitted w float input the weights to be assigned to each point nsg int input How many breaks to use c2 float output The Chi^2 value of the resulting fit History: Original: 4/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_pwfit.pro)
GR_RC_GET Read the user's .grafferrc file. Usage: gr_rc_get, opts Argument: opts struct output The graffer options sub-structure. Note: This is a procedure rather than a function as functions tend to croak if asked to return undefined values. History: Extracted from GRAFF_INIT: 21/8/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_rc_get.pro)
GR_RECOVER Ask about options for recovery if requested mode and apparent best option don't match. Usage: icont = gr_recover(imode) Return value: 1 -> Use the autosave file 0 -> Use the primary file -1 -> Cancel the open Argument: imode int input 0 = autosave file present and not requested 1 = autosave file requested and not found History: Original: 22/4/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_recover.pro)
GR_RESAVE Do you want to resave a V1 file as V2 Usage: gr_resave, pdefs Argument pdefs struct input The graffer structure, needed if save requested. History: Original (from GRAFF_S_PROMPT): 5/11/96; SJT Shorten name: 25/11/96; SJT Add options for binary or ascii save: 15/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_resave.pro)
GR_SPLIT_DIR Separate a file name into a directory and a file name. Usage: gr_split_dir, file, dir Arguments: file string in/out On entry the full filename, on exit the filename part. dir string output The directory name. History: Original: 18/8/95; SJT Rename as GR_SPLIT_DIR (was split_dir): 18/9/96; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_split_dir.pro)
GR_STATE
Restore the entry state of graffer.
Usage:
gr_state[, id]
Argument:
id long input Widget ID of the widget invoking
gr_state.
Notes:
This routine is intended to operate as a "KILL_NOTIFY"
callback procedure -- I hope that this will prevent some of
the problems associated with the IDL being left in a stange
state when GRAFFER exits out of control.
History:
Original: 23/1/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_state.pro)
GR_STR_FUN Given a set of coefficients and a variable return an IDL function Usage: fun = gr_str_fun(fit, var) Return value: fun string The polynomial as a string suitable for EXECUTE Arguments: fit float input An array of polynomial coefficients var string input The variable of which this is a polynomial Keyword: pieces ?? input If set & non-zero then fit is in terms of the piecewise linear fit. History: Original: 22/11/96; SJT Add PIECES: 4/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_str_fun.pro)
GR_STRPUT Put a tag and string value to a binary GRAFFER file Usage: gr_str_put, ilu, tag, str Argument: iunit int input The IDL file unit number tag string input The tag for the string str string input The actual string History: Original: 15/1/96; SJT Add array support: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_str_put.pro)
GR_STR_RD Read a string value from a binary GRAFFER file Usage: str = gr_str_rd(ilu) Return value: str string The required string Argument: iunit int input The IDL file unit number History: Original: 15/1/96; SJT Made unique in 8.3: 11/2/97; SJT Add array support: 23/6/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_str_rd.pro)
GR_STR_VAL Return string value associated with a tag Return value: value string The value associated with the tag. Arguments: line string input The string containing the tag tag string input The tag whose value is to be returned. History: Original: 5/11/96; SJT Made unique in 8.3: 11/2/97; SJT
(See /host/bluemoon/usr2/idllib/contrib/tappin/graffer/gr_str_val.pro)
GR_SYMDEF User USERSYM to define the GRAFFER symbols that aren't part of the standard IDL set. Usage: gr_symdef, index Argument: index int input The symbol index (8->n) 8 - circle