g2 graphical library

SourceForge Logo
Current version: 0.72

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, PNG and JPEG (using gd) and Win32 (xfig is in development). g2 is written in C (ANSI) and additionally has a Fortran, perl and Python interface. See the g2 screenshots.
For downloads and general project info please visit g2 project page. If you have comments, questions or bugreports please use g2-devel mailing list.
Note: If you are planning to change/extend g2 source code use always (latest) cvs version.

  • 12.10.2006 - released 0.71
  • 17.10.2006 - released 0.72


g2 is easy to use

in Cin Fortranin perlin Python

 d=g2_open_X11(50,50);
 g2_line(d,5,5,45,45);
 g2_circle(d,25,25,20);

 d=g2_open_X11(50.0,50.0)
 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);
 $d->line(5,5,45,45);
 $d->circle(25,25,20);

graph = g2.g2_open_X11(50, 50)
graph.g2_line(5, 5, 45, 45)
graph.g2_circle(25, 25, 20)

g2 is portable

g2 is tested on: Linux, AIX, Digital Unix, SunOS, IRIX, VMS, WindowsNT/2000

g2 supports

PostScript, X11, PNG and Win32


Documentation

g2 manual
README
CHANGES
INSTALL

Links

The gd library used by g2 for bitmap support
An Octave interface for g2 has been made available by Muthiah Annamalai


Download g2 from project home


Ljubomir Milanovic, Horst Wagner