AGP_ACTIV( status )
Initialise PGPLOT
AGP_ASSOC( param, acmode, pname, border, picid, status)
Associate a device with AGI and PGPLOT through ADAM
AGP_DEACT( status )
Close down PGPLOT
AGP_DEASS( param, parcan, status )
De-associate a device from AGI and PGPLOT
AGP_NVIEW( border, status )
Create a new PGPLOT viewport from the current picture
AGP_SVIEW( pname, coment, picid, status )
Save the current PGPLOT viewport in the database
AGS_ACTIV( status )
Initialise SGS
AGS_ASSOC( param, acmode, pname, picid, newzon, status )
Associate a device with AGI and SGS through ADAM
AGS_DEACT( status )
Close down SGS
AGS_DEASS( param, parcan, status )
De-associate a device from AGI and SGS
AGS_NZONE( newzon, status )
Create a new SGS zone from the current picture
AGS_SZONE( pname, coment, picid, status )
Save the current SGS zone in the database
AGD_ACTIV( status )
Initialise IDI
AGD_ASSOC( param, acmode, pname, memid, picid, dispid, xsize, ysize, xoff, yoff, status
)
Associate a device with AGI and IDI through ADAM
AGD_DEACT( status )
Close down IDI
AGD_DEASS( param, parcan, status )
Deassociate a device from AGI and IDI
AGD_NWIND( memid, dispid, xsize, ysize, xoff, yoff, status )
Define an IDI window from the current picture
AGD_SWIND( dispid, memid, xsize, ysize, xoff, yoff, pname, coment, wx1, wx2, wy1, wy2, picid,
status )
Save an IDI window in the database
AGI_ANNUL( picid, status )
Annul a picture identifier
AGI_ASSOC( param, acmode, picid, status )
Associate an AGI device with an ADAM parameter
AGI_BEGIN
Mark the beginning of a new AGI scope
AGI_CANCL( param, status )
Cancel the ADAM device parameter
AGI_CLOSE( status )
Close AGI in non-ADAM environments
AGI_END( picid, status )
Mark the end of an AGI scope
AGI_NUPIC( wx1, wx2, wy1, wy2, pname, coment, newx1, newx2, newy1, newy2, picid, status
)
Create a new picture in the database
AGI_OPEN( wkname, acmode, picid, status )
Open an AGI device in a non-ADAM environment
AGI_PDEL( status )
Delete all the pictures on the current device
AGI_SELP( picid, status )
Select the given picture as the current one
AGI_SROOT( status )
Select the root picture for searching
AGI_RCF( pname, picid, status )
Recall first picture of specified name
AGI_RCFP( pname, x, y, picid, status )
Recall first picture embracing a position
AGI_RCL( pname, picid, status )
Recall last picture of specified name
AGI_RCLP( pname, x, y, picid, status )
Recall last picture embracing a position
AGI_RCP( pname, pstart, picid, status )
Recall preceding picture of specified name
AGI_RCPP( pname, pstart, x, y, picid, status )
Recall preceding picture embracing a position
AGI_RCS( pname, pstart, picid, status )
Recall succeeding picture of specified name
AGI_RCSP( pname, pstart, x, y, picid, status )
Recall succeeding picture embracing a position
AGI_ILAB( picid, label, status )
Inquire label of a picture
AGI_SLAB( picid, label, status )
Store label in picture
AGI_GTREF( picid, mode, datref, status )
Get a reference object from a picture
AGI_PTREF( datref, picid, status )
Store a reference object in a picture
AGI_TCOPY( trnloc, picid, status )
Copy a transformation structure to the database
AGI_TDDTW( picid, nxy, dx, dy, wx, wy, status )
Transform double precision data to world coordinates
AGI_TDTOW( picid, nxy, dx, dy, wx, wy, status )
Transform data to world coordinates
AGI_TNEW( ncd, ncw, dtow, wtod, picid, status )
Store a transformation in the database
AGI_TRUNC( status )
Truncate the AGI database file by removing unused space
AGI_TWTDD( picid, nxy, wx, wy, dx, dy, status )
Transform double precision world to data coordinates
AGI_TWTOD( picid, nxy, wx, wy, dx, dy, status )
Transform world to data coordinates
AGI_IBASE( picid, status )
Inquire base picture for current device
AGI_ICOM( coment, status )
Inquire comment for the current picture
AGI_ICURP( picid, status )
Inquire the current picture
AGI_INAME( pname, status )
Inquire name of the current picture
AGI_IPOBS( picid, lobs, status )
Is current picture obscured by another?
AGI_ISAMD( picid, lsame, status )
Inquire if pictures are on same device
AGI_ISAMP( picid, lsame, status )
Inquire if two pictures are the same
AGI_ITOBS( nxy, x, y, ltobs, status )
Inquire if test points are obscured
AGI_IWOCO( wx1, wx2, wy1, wy2, status )
Inquire world coordinates of current picture
AGI_IMORE( picid, lmore, status )
Inquire if a MORE structure exists
AGI_MORE( picid, acmode, morloc, status )
Return an HDS locator to a MORE structure
The lengthy subroutine list suggests that any application utilising AGI could end up looking complicated, but this need not be the case. By using the wrap-up routines simple applications need only call two or three routines from the list. As an example consider first an application that plots something on the screen and makes an entry in the database. A second application then uses a cursor to read a position from the graph. The second application is quite general and will work with any application that creates a DATA picture in the database, such as KAPPA:DISPLAY. Note that, as this example uses PGPLOT, it can be linked with either the GKS-based AGI library or the native-PGPLOT AGP library. However Starlink policy is that GKS is being phased out and so all new production applications should be linked with the AGP library as described in Section 8.
The program requires an interface file to define the DEVICE parameter. The following example will do the job:-
Program notes:
Program notes: