GLE stands for graphics layout engine. Essentially, it is a scripting language (a kind of programming language) that lets you draw figures, diagrams, and graphs. GLE outputs to graphics file formats such as Encapsulated PostScript (EPS) or Portable Document Format (PDF). The scripting language is very flexible, supporting commands for standard graphics elements and programming constructs.
For example it supports:
The original version of GLE was developed by Chris Pugmire and included support for various types of output devices. The most useful output device (for me at least) is PostScript. It is very handy for people who use LaTeX, since it allows creation of excellent looking EPS and PDF files that can be directly included into the LaTeX document. In addition, it included an editor, previewer and other utilities like a simple spreadsheet.
How does GLE work?
How do I draw a graph?
First create a data file with your data in it (call it data.dat). This can be a multi column file where the columns are separated by spaces, tabs, or commas.
For example:
For example:
See the documentation for more information on drawing graphs.
Where do I get GLE?
Click here to go to the download page.
Under what license is GLE distributed?
GLE is available under the BSD license.
GLE comes with a user interface QGLE. QGLE is licensed under the GNU
General Public License (GPL) as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any
later version.
How do I install GLE?
How do I compile GLE?
What packages are needed to compile GLE?
One of the latest standard C++ compilers: GCC or Microsoft Visual C++. For support for including bitmap files, you will need libtiff (www.libtiff.org), libjpeg (www.ijg.org), and libpng (www.libpng.org) as well.
Is GLE a GUI program?
GLE comes with a graphical user interface called QGLE.
What compilers/operating systems do you support?
GLE is platform independent and will run on any OS or be built with any compiler. Currently there are makefiles for MSVC and GCC and supported platforms are Windows, Cygwin, Linux, Mac OS/X, and OS/2. If you have another compiler or OS you want to use it on, please develop you own makefiles (makefile.compiler) and add them to the distribution (become a GLE developer). You may need to define your own macro for platform dependent peculiarities (like __WIN32__ and __UNIX__ that exists now).
When running GLE I get a "font.dat" not found. Is this a bug?
No, its not a bug, you need to configure your environment properly. Set the environment variable GLE_TOP to point to the place that GLE is located. Note: recent GLE versions do not require GLE_TOP.
What environment variables are used by GLE?
The GLE_USRLIB environment variable is used to locate include files. It can contain a list of paths separated by your platforms path separator (; Windows : Unix). This is much like the PATH environment variable used by your operating system.
When running the makefile, I get an error that it can't find tiffio.h
You need to install libtiff. Or you can disable TIFF support in config.i by opening config.i with an editor and following instructions for disabling TIFF support.
size 10 10 ! size of drawing area is 10 cm x 10 cm
amove 1 1 ! move to position 1,1 in cm
box 3 2 fill red ! draw a box that is 3cm by 2cm and fill it red
! note: the outline of the box is the current
! drawing color which is black by default
set color blue ! sets drawing color to blue
amove 4 4 ! moves to 4,4 in cm
box 2 2 fill blue ! draws a box that is 2x2 cm filled in blue
! and outlined in blue
set color black ! set color back to black
set just cc ! set text justification to center center
amove 5 7 ! move to (5,7)cm and draw some text
text Hello World.
E.g., type:
/foo/bar> gle -d eps sample.gle
This produces sample.eps, which looks like this:
To see more examples click here.
0 0
2 3
4 5
5 10
Then use the graphing commands in GLE.
size 10 10
begin graph
data "data.dat"
d1 marker fcircle color red
title "This is the graph title"
xtitle "This is the x axis title"
ytitle "This is the y axis title"
end graph