giza - documentation

- news
- download
- documentation
- contact
- samples

# PGPLOT interface

Included with giza are PGPLOT interfaces that aim to replicate the full public interface to PGPLOT. This means that giza can be compiled as a drop-in replacement for libpgplot and libcpgplot. So older programs written using PGPLOT can be linked against giza with the source code unchanged, giving a modern plotting library with antialiased lines, real fonts and PDF output. For the c library (libcpgplot) it also avoids the unnecessary linking against FORTRAN necessary with the original libcpgplot so increases portability of code written in c. The giza-PGPLOT API also aims to provide maximum backwards compatibility with PGPLOT (e.g., line styles, greek letter escape sequences, etc.) so that codes can be transitioned with ease.

The status of the standard Fortran (libpgplot) and C (libcpgplot) interfaces are given below. Contributions most welcome!

## Current status (libpgplot):

PGARRO | IMPLEMENTED | draw an arrow
PGASK | IMPLEMENTED | control new page prompting
PGAXIS | IMPLEMENTED | draw an axis
PGBAND | IMPLEMENTED | read cursor position, with anchor
PGBBUF | IMPLEMENTED | begin batch of output (buffer)
PGBEG | IMPLEMENTED | open a graphics device
PGBIN | IMPLEMENTED | histogram of binned data
PGBOX | IMPLEMENTED | draw labeled frame around viewport
PGCIRC | IMPLEMENTED | draw a circle, using fill-area attributes
PGCLOS | IMPLEMENTED | close the selected graphics device
PGCONB | PARTIALLY IMPLEMENTED | contour map of a 2D data array, with blanking
PGCONF | NOT IMPLEMENTED | fill between two contours
PGCONL | PARTIALLY IMPLEMENTED | label contour map of a 2D data array
PGCONS | IMPLEMENTED | contour map of a 2D data array (fast algorithm)
PGCONT | IMPLEMENTED | contour map of a 2D data array (contour-following)
PGCONX | NOT IMPLEMENTED | contour map of a 2D data array (non rectangular)
PGCTAB | PARTIALLY IMPLEMENTED | install the color table to be used by PGIMAG
PGCURS | IMPLEMENTED | read cursor position
PGDRAW | IMPLEMENTED | draw a line from the current pen position to a point
PGEBUF | IMPLEMENTED | end batch of output (buffer)
PGEND | IMPLEMENTED | close all open graphics devices
PGENV | IMPLEMENTED | set window and viewport and draw labeled frame
PGERAS | IMPLEMENTED | erase all graphics from current page
PGERR1 | IMPLEMENTED | horizontal or vertical error bar
PGERRB | IMPLEMENTED | horizontal or vertical error bar
PGERRX | IMPLEMENTED | horizontal error bar
PGERRY | IMPLEMENTED | vertical error bar
PGETXT | NOT IMPLEMENTED | erase text from graphics display
PGFUNT | IMPLEMENTED | function defined by X = F(T), Y = G(T)
PGFUNX | IMPLEMENTED | function defined by Y = F(X)
PGFUNY | IMPLEMENTED | function defined by X = F(Y)
PGGRAY | IMPLEMENTED | gray-scale map of a 2D data array
PGHI2D | NOT IMPLEMENTED | cross-sections through a 2D data array
PGHIST | IMPLEMENTED | histogram of unbinned data
PGIDEN | IMPLEMENTED | write username, date, and time at bottom of plot
PGIMAG | IMPLEMENTED | color image from a 2D data array
PGLAB | IMPLEMENTED | write labels for x-axis, y-axis, and top of plot
PGLCUR | IMPLEMENTED | draw a line using the cursor
PGLDEV | IMPLEMENTED | list available device types on standard output
PGLEN | IMPLEMENTED | find length of a string in a variety of units
PGLINE | IMPLEMENTED | draw a polyline (curve defined by line-segments)
PGMOVE | IMPLEMENTED | move pen (change current pen position)
PGMTXT | IMPLEMENTED | write text at position relative to viewport
PGNCUR | IMPLEMENTED | mark a set of points using the cursor
PGNUMB | IMPLEMENTED | convert a number into a plotable character string
PGOLIN | IMPLEMENTED | mark a set of points using the cursor
PGOPEN | IMPLEMENTED | open a graphics device
PGPAGE | IMPLEMENTED | advance to new page
PGPANL | IMPLEMENTED | switch to a different panel on the view surface
PGPAP | IMPLEMENTED | change the size of the view surface
PGPIXL | IMPLEMENTED | draw pixels
PGPNTS | NOT IMPLEMENTED | draw several graph markers, not all the same
PGPOLY | IMPLEMENTED | draw a polygon, using fill-area attributes
PGPT | IMPLEMENTED | draw several graph markers
PGPT1 | IMPLEMENTED | draw one graph marker
PGPTXT | IMPLEMENTED | write text at arbitrary position and angle
PGQAH | IMPLEMENTED | inquire arrow-head style
PGQCF | IMPLEMENTED | inquire character font
PGQCH | IMPLEMENTED | inquire character height
PGQCI | IMPLEMENTED | inquire color index
PGQCIR | IMPLEMENTED | inquire color index range
PGQCLP | IMPLEMENTED | inquire clipping status
PGQCOL | IMPLEMENTED | inquire color capability
PGQCR | IMPLEMENTED | inquire color representation
PGQCS | IMPLEMENTED | inquire character height in a variety of units
PGQDT | NOT IMPLEMENTED | inquire name of nth available device type
PGQFS | IMPLEMENTED | inquire fill-area style
PGQHS | IMPLEMENTED | inquire hatching style
PGQID | IMPLEMENTED | inquire current device identifier
PGQINF | IMPLEMENTED | inquire PGPLOT general information
PGQITF | NOT IMPLEMENTED | inquire image transfer function
PGQLS | IMPLEMENTED | inquire line style
PGQLW | IMPLEMENTED | inquire line width
PGQNDT | NOT IMPLEMENTED | inquire number of available device types
PGQPOS | IMPLEMENTED | inquire current pen position
PGQTBG | IMPLEMENTED | inquire text background color index
PGQTXT | IMPLEMENTED | find bounding box of text string
PGQVP | IMPLEMENTED | inquire viewport size and position
PGQVSZ | IMPLEMENTED | inquire size of view surface
PGQWIN | IMPLEMENTED | inquire window boundary coordinates
PGRECT | IMPLEMENTED | draw a rectangle, using fill-area attributes
PGRND | IMPLEMENTED | find the smallest `round' number greater than x
PGRNGE | IMPLEMENTED | choose axis limits
PGSAH | IMPLEMENTED | set arrow-head style
PGSAVE | IMPLEMENTED | save PGPLOT attributes
PGUNSA | IMPLEMENTED | restore PGPLOT attributes
PGSCF | IMPLEMENTED | set character font
PGSCH | IMPLEMENTED | set character height
PGSCI | IMPLEMENTED | set color index
PGSCIR | IMPLEMENTED | set color index range
PGSCLP | IMPLEMENTED | enable or disable clipping at edge of viewport
PGSCR | IMPLEMENTED | set color representation
PGSCRL | NOT IMPLEMENTED | scroll window
PGSCRN | NOT IMPLEMENTED | set color representation by name
PGSFS | IMPLEMENTED | set fill-area style
PGSHLS | IMPLEMENTED | set color representation using HLS system
PGSHS | IMPLEMENTED | set hatching style
PGSITF | NOT IMPLEMENTED | set image transfer function
PGSLCT | IMPLEMENTED | select an open graphics device
PGSLS | IMPLEMENTED | set line style
PGSLW | IMPLEMENTED | set line width
PGSTBG | IMPLEMENTED | set text background color index
PGSUBP | IMPLEMENTED | subdivide view surface into panels
PGSVP | IMPLEMENTED | set viewport (normalized device coordinates)
PGSWIN | IMPLEMENTED | set window
PGTBOX | IMPLEMENTED | draw frame and write (DD) HH MM SS.S labelling
PGTEXT | IMPLEMENTED | write text (horizontal, left-justified)
PGTICK | IMPLEMENTED | draw a single tick mark on an axis
PGUPDT | IMPLEMENTED | update display
PGVECT | IMPLEMENTED | vector map of a 2D data array, with blanking
PGVSIZ | IMPLEMENTED | set viewport (inches)
PGVSTD | IMPLEMENTED | set standard (default) viewport
PGWEDG | IMPLEMENTED | annotate an image plot with a wedge
PGWNAD | IMPLEMENTED | set window and adjust viewport to same aspect ratio
PGADVANCE | IMPLEMENTED | non-standard alias for PGPAGE
PGBEGIN | IMPLEMENTED | non-standard alias for PGBEG
PGCURSE | IMPLEMENTED | non-standard alias for PGCURS
PGLABEL | IMPLEMENTED | non-standard alias for PGLAB
PGMTEXT | IMPLEMENTED | non-standard alias for PGMTXT
PGNCURSE | IMPLEMENTED | non-standard alias for PGNCUR
PGPAPER | IMPLEMENTED | non-standard alias for PGPAP
PGPOINT | IMPLEMENTED | non-standard alias for PGPT
PGPTEXT | IMPLEMENTED | non-standard alias for PGPTXT
PGVPORT | IMPLEMENTED | non-standard alias for PGSVP
PGVSIZE | IMPLEMENTED | non-standard alias for PGVSIZ
PGVSTAND | IMPLEMENTED | non-standard alias for PGVSTD
PGWINDOW | IMPLEMENTED | non-standard alias for PGSWIN

116 of 127 routines implemented, 113 of 127 fully implemented.

## Current status (libcpgplot):

cpgarro | IMPLEMENTED | draw an arrow
cpgask | IMPLEMENTED | control new page prompting
cpgaxis | IMPLEMENTED | draw an axis
cpgband | IMPLEMENTED | read cursor position, with anchor
cpgbbuf | IMPLEMENTED | begin batch of output (buffer)
cpgbeg | IMPLEMENTED | open a graphics device
cpgbin | IMPLEMENTED | histogram of binned data
cpgbox | IMPLEMENTED | draw labeled frame around viewport
cpgcirc | IMPLEMENTED | draw a circle, using fill-area attributes
cpgclos | IMPLEMENTED | close the selected graphics device
cpgconb | PARTIALLY IMPLEMENTED | contour map of a 2D data array, with blanking
cpgconf | NOT IMPLEMENTED | fill between two contours
cpgconl | PARTIALLY IMPLEMENTED | label contour map of a 2D data array
cpgcons | IMPLEMENTED | contour map of a 2D data array (fast algorithm)
cpgcont | IMPLEMENTED | contour map of a 2D data array (contour-following)
cpgctab | IMPLEMENTED | install the color table to be used by pgimag
cpgcurs | IMPLEMENTED | read cursor position
cpgdraw | IMPLEMENTED | draw a line from the current pen position to a point
cpgebuf | IMPLEMENTED | end batch of output (buffer)
cpgend | IMPLEMENTED | close all open graphics devices
cpgenv | IMPLEMENTED | set window and viewport and draw labeled frame
cpgeras | IMPLEMENTED | erase all graphics from current page
cpgerr1 | IMPLEMENTED | horizontal or vertical error bar
cpgerrb | IMPLEMENTED | horizontal or vertical error bar
cpgerrx | IMPLEMENTED | horizontal error bar
cpgerry | IMPLEMENTED | vertical error bar
cpgetxt | NOT IMPLEMENTED | erase text from graphics display
cpggray | IMPLEMENTED | gray-scale map of a 2D data array
cpghi2d | NOT IMPLEMENTED | cross-sections through a 2D data array
cpghist | IMPLEMENTED | histogram of unbinned data
cpgiden | IMPLEMENTED | write username, date, and time at bottom of plot
cpgimag | IMPLEMENTED | color image from a 2D data array
cpglab | IMPLEMENTED | write labels for x-axis, y-axis, and top of plot
cpglcur | IMPLEMENTED | draw a line using the cursor
cpgldev | IMPLEMENTED | list available device types on standard output
cpglen | IMPLEMENTED | find length of a string in a variety of units
cpgline | IMPLEMENTED | draw a polyline (curve defined by line-segments)
cpgmove | IMPLEMENTED | move pen (change current pen position)
cpgmtxt | IMPLEMENTED | write text at position relative to viewport
cpgncur | IMPLEMENTED | mark a set of points using the cursor
cpgnumb | IMPLEMENTED | convert a number into a plottable character string
cpgolin | IMPLEMENTED | mark a set of points using the cursor
cpgopen | IMPLEMENTED | open a graphics device
cpgpage | IMPLEMENTED | advance to new page
cpgpanl | IMPLEMENTED | switch to a different panel on the view surface
cpgpap | IMPLEMENTED | change the size of the view surface
cpgpixl | IMPLEMENTED | draw pixels
cpgpnts | NOT IMPLEMENTED | draw several graph markers, not all the same
cpgpoly | IMPLEMENTED | draw a polygon, using fill-area attributes
cpgpt | IMPLEMENTED | draw several graph markers
cpgpt1 | IMPLEMENTED | draw one graph marker
cpgptxt | IMPLEMENTED | write text at arbitrary position and angle
cpgqah | IMPLEMENTED | inquire arrow-head style
cpgqcf | IMPLEMENTED | inquire character font
cpgqch | IMPLEMENTED | inquire character height
cpgqci | IMPLEMENTED | inquire color index
cpgqcir | IMPLEMENTED | inquire color index range
cpgqclp | IMPLEMENTED | inquire clipping Status
cpgqcol | IMPLEMENTED | inquire color capability
cpgqcr | IMPLEMENTED | inquire color representation
cpgqcs | IMPLEMENTED | inquire character height in a variety of units
cpgqdt | NOT IMPLEMENTED | inquire name of nth available device type
cpgqfs | IMPLEMENTED | inquire fill-area style
cpgqhs | IMPLEMENTED | inquire hatching style
cpgqid | IMPLEMENTED | inquire current device identifier
cpgqinf | NOT IMPLEMENTED | inquire pgplot general information
cpgqitf | NOT IMPLEMENTED | inquire image transfer function
cpgqls | IMPLEMENTED | inquire line style
cpgqlw | IMPLEMENTED | inquire line width (as integer)
cpgqndt | NOT IMPLEMENTED | inquire number of available device types
cpgqpos | IMPLEMENTED | inquire current pen position
cpgqtbg | IMPLEMENTED | inquire text background color index
cpgqtxt | IMPLEMENTED | find bounding box of text string
cpgqvp | IMPLEMENTED | inquire viewport size and position
cpgqvsz | IMPLEMENTED | inquire size of view surface
cpgqwin | IMPLEMENTED | inquire window boundary coordinates
cpgrect | IMPLEMENTED | draw a rectangle, using fill-area attributes
cpgrnd | IMPLEMENTED | find the smallest `round' number greater than x
cpgrnge | IMPLEMENTED | choose axis limits
cpgsah | IMPLEMENTED | set arrow-head style
cpgsave | IMPLEMENTED | save pgplot attributes
cpgunsa | IMPLEMENTED | restore pgplot attributes
cpgscf | IMPLEMENTED | set character font
cpgsch | IMPLEMENTED | set character height
cpgsci | IMPLEMENTED | set color index
cpgscir | IMPLEMENTED | set color index range
cpgsclp | IMPLEMENTED | enable or disable clipping at edge of viewport
cpgscr | IMPLEMENTED | set color representation
cpgscrl | NOT IMPLEMENTED | scroll window
cpgscrn | NOT IMPLEMENTED | set color representation by name
cpgsfs | IMPLEMENTED | set fill-area style
cpgshls | IMPLEMENTED | set color representation using hls system
cpgshs | IMPLEMENTED | set hatching style
cpgsitf | NOT IMPLEMENTED | set image transfer function
cpgslct | IMPLEMENTED | select an open graphics device
cpgsls | IMPLEMENTED | set line style
cpgslw | IMPLEMENTED | set line width
cpgstbg | IMPLEMENTED | set text background color index
cpgsubp | IMPLEMENTED | subdivide view surface into panels
cpgsvp | IMPLEMENTED | set viewport (normalized device coordinates)
cpgswin | IMPLEMENTED | set window
cpgtbox | IMPLEMENTED | draw frame and write (dd) hh mm ss.s labelling
cpgtext | IMPLEMENTED | write text (horizontal, left-justified)
cpgtick | IMPLEMENTED | draw a single tick mark on an axis
cpgupdt | IMPLEMENTED | update display
cpgvect | IMPLEMENTED | vector map of a 2D data array, with blanking
cpgvsiz | IMPLEMENTED | set viewport (inches)
cpgvstd | IMPLEMENTED | set standard (default) viewport
cpgwedg | IMPLEMENTED | annotate an image plot with a wedge
cpgwnad | IMPLEMENTED | set window and adjust viewport to same aspect ratio

99 of 110 routines implemented, 97 of 110 fully implemented.