PGPLOT
The following PGPLOT routines are currently available as TCL verbs from
DERVISH:
New with Pgplot v5_0_1
pgArrowDraw an arrow from X1,Y1 to X2,Y2.
pgBandRead cursor position and character typed by user.
pgCircDraw a circle.
pgConlLabel a contour map drawn with routine PGCONT.
pgErasErase all graphics from the current page or panel.
pgImagDraw a color image of an array in current window.
pgLenWork out length of a string in x and y directions.
pgPanlStart plotting in a different panel.
pgPixlDraw lots of solid-filled (tiny) rectangles aligned with the coordinate axes.
pgPntsDraw Graph Markers. Unlike PGPT, this routine can draw a different symbol at each point.
pgQtxtReturns a bounding box for a text string.
pgQahInquire as to the arrow-head style
pgQcirQuery the color index range to be used for producing images with PGGRAY or PGIMAG.
pgQcrQuery the RGB colors associated with a color index.
pgQcsReturn the current PGPLOT character height in a variety of units.
pgQitfReturn the Image Transfer Function as set by default or by a previous call to PGSITF.
pgQposQuery the current pen position in world C coordinates (X,Y).
pgQtbgQuery the current Text Background Color Index (set by routine PGSTBG).
pgQvszReturn the window, in a variety of units, defined by the full device view surface (0 -> 1 in normalized device coordinates)
pgSahSet the style to be used for arrowheads drawn with routine PGARRO.
pgSaveSave the current PGPLOT attributes in a private storage area. Attributes saved are: character font, character height, color index, fill-area style, line style, line width, pen position, arrow-head style.
pgScirSet the color index range to be used for producing images with PGGRAY or PGIMAG.
pgScrnSet color representation: i.e., define the color to be associated with a color index.
pgSitfSet the Image Transfer Function for subsequent images drawn by PGIMAG, PGGRAY, or PGWEDG.
pgStbgSet the Text Background Color Index for subsequent text. By default text does not obscure underlying graphics. If the text background color index is positive, text is opaque
pgSubpDivides the physical surface of the plotting device (screen, window, or sheet of paper) into NXSUB x NYSUB `panels'.
pgTboxDraw a box and optionally label one or both axes with (DD) HH MM SS tyle numeric labels (useful for time or RA - DEC plots).
pgUnsaRestore the PGPLOT attributes saved in the last call to pgSave
pgWedgePlot an annotated grey-scale or color wedge parallel to a given axis.
pgVectDraw a vector map of two arrays.
Fermi Additions to Pgplot
pgGet Send a metafile disk file to a Pgplot device.
pgSaveMf Save a plot(s) as a local metafile disk file.
pgGeomGet Return the current geometry for pgplot windows as a Tcl list.
pgGeomSet Set the current geometry for pgplot windows.
CONTROL verbs
pgAsk Change prompt state.
pgBbuf Save graphical commands in a
buffer.
pgBegin Open the plot file.
pgEbuf Stop saving graphical commands.
pgEnd Close the plot file.
pgPage Advance to a new page.
pgPaper Change the size of the view
paper.
pgUpdt Update the graphics display.
WINDOW and VIEWPORT verbs
pgBox Annotate the viewport.
pgEnv Set plotter environment.
pgVport Change the size of the viewport.
pgVsize Change the size of the viewport.
pgVstand Define viewport as standard
viewport.
pgWindow Change the window.
pgWnad Change the window.
PRIMITIVE DRAWING verbs
pgDraw Draw a line.
pgLine Draw a polyline.
pgMove Move 'pen' to a specified point.
pgPoint Draw a point.
pgPoly Shade interior of a closed polygon.
pgRect Draw a rectangle.
TEXT verbs
pgLabel Write a label outside the
viewport.
pgMtext Write text in or outside the
viewport.
pgPtext Draw text.
pgText Write text.
ATTRIBUTE SETTING verbs
pgScf Set the character font.
pgSch Set the character size.
pgSci Set the color index.
pgScr Set the color representation.
pgSfs Set the fill area style.
pgShls Set the color representation.
pgSls Set the line style.
pgSlw Set the line width.
HIGHER-LEVEL DRAWING verbs
pgBin Plot a histogram.
pgCons Draw a contour map.
pgCont Draw a contour map.
pgConx draw a contour map using a user
supplied plotting routine.
pgErrx Plot horizontal error bars.
pgErry Plot vertical error bars.
pgFunt Draw a curve.
pgFunx Draw a curve.
pgFuny Draw a curve.
pgGray Draw a grey map.
pgHi2d Plot cross-sections through a 2D
data array.
pgHist Draw a histogram.
INTERACTIVE GRAPHICS verbs
pgCurse Read position and character typed
by user.
pgLcurse Enter a polyline through the
cursor.
pgNcurse Enter data points through the
cursor.
pgOlin Enter data points through the
cusor.
INQUIRY verbs
pgQcf Query the character font.
pgQch Query the character size.
pgQci Query the color index.
pgQcol Query the range of the color indices for this device.
pgQcr Query the color representation.
pgQfs Query the fill-area style.
pgQinf Obtain information about the plotting
environment.
pgQls Query the line style.
pgQlw Query the line width.
pgQvp Query the viewport setting.
pgQwin Query the current window setting.
UTILITY verbs
pgEtxt Erase only the text.
pgIden Write id information on the plot.
pgLdev List all known device types.
pgNumb Convert a number to a character.
pgRnd Find smallest round number.
pgRnge Choose plotting limits.
PRINTING verbs
pgPrinter Choose the printer command.
pgDump Create a postscript bitmap of plot.
The following rules should be followed:
o Routines should be called using lower case letters.
o User supplied function arguments returning a value should be declared
to return the appropriate value type and accept as arguments pointers
of appropriate type as described in the PGPLOT manual.
For example to call:
SUBROUTINE PGFUNX (FY, N, XMIN, XMAX, PGFLAG)
the C calling sequence should be:
float myfy (float *x) { return (*x * 2.); }
main ()
{
.....
pgplot_pgfunx (myfy, &n, &xmin, &xmax, &pgflag);
.....
}