SAL Home PROGRAM Other Graphic Libraries


g2 is an easy to use, portable and powerful 2D graphics library. It provides a comprehensive set of functions for simultaneous generation of graphical output on different types of devices. Following devices are currently supported: PostScript, X11, GIF (using gd) and Win32 (xfig is in development). g2 is written in C (ANSI) and additionally has a Fortran and perl interface.

A simple example:


 call g2_line(d,5.0,5.0,45.0,45.0)
 call g2_circle(d,25.0,25.0,20.0)
 $d=new X11G2::Device(50,50);

Current Version:   0.40

License Type:   GPL

Home Site:

Source Code Availability:   Yes

Available Binary Packages:

Targeted Platforms:

Linux, AIX, Digital Unix, VMS, WindowsNT

Software/Hardware Requirements:

C Compiler, gd library for GIF output

Other Links:

Mailing Lists/USENET News Groups:


User Comments:

  • None

See A Screen Shot?

g2 test window
Using g2 in molecular dynamic simulation
g2 in action (simulation of a 1D gravitational field)

  SAL Home   |   Programming   |   Other Graphic Libraries

Comments? SAL@KachinaTech.COM
Copyright © 1995-2001 by Herng-Jeng Jou
Copyright © 1997-2001 by Kachina Technologies, Inc.
All rights reserved.