Tioga: Plotting using Ruby, PDF, and TeX




Contents
Introduction

Feedback

Mailing Lists

System Requirements and Installation Instuctions
pdflatex

Ruby
Downloads

Ctioga

Examples



Introduction

Tioga is an open-source program for creating figures and plots using Ruby, PDF, and TeX.
The Tioga kernel is a Unix based extension to the object-oriented scripting language Ruby.   The kernel implements commands that make figures and plots using a large subset of PDF for graphics and TeX for typesetting and fonts.

There are two Tioga front-ends: a command-line tool that runs in "irb", the "Interactive Ruby" interpreter, and a graphical user interface for the Mac.

Information about open source licenses, credits, and what "Tioga" stands for can be found at the Tioga information page.

Tioga has extensive on-line documentation, including a multi-part tutorial that covers the essentials of using Ruby for Tioga.  It also includes sections on the Tioga document structure, detailed examples of programs for figures and plots, the command-line and graphical front ends, as well as discussions of using Tioga to create sampled images, contour plots, and simple animation.   There is detailed reference material with a browser interface for classes and methods.
As of early June, 2006, Tioga is in beta release.  After spending a year in alpha, it is ready for a wider audience.  There will certainly be more changes (and perhaps even a bug fix or two), but I think Tioga no longer needs the "use at your own risk" label.  Of course, if you do run into trouble, please send an email to the tioga-users mailing list, and someone should be able to help -- or at least give you sympathy!



This figure was made using Tioga.   It uses a variety of PDF graphics abilities including axial gradient fill for the background, clipping to character shapes and a colormap fill for the "Tioga".   It uses italic slanting, vertical and horizontal scaling, and transparency for the "Tioga" shadow.   The "Ruby", "PDF", and "TeX" strings are done using LaTeX for typesetting and fonts.   The PDF background graphics and the TeX foreground text are combined by pdflatex to form the final figure.   The figure is specified by a small program in the object-oriented scripting language Ruby.   Tioga also has extensive support for 2D plotting.   There are a few more examples below, and many more in the tutorial.
Tioga was originally designed and implemented by Bill Paxton, one of the creators of Adobe PostScript (no, not that other Bill Paxton who's in the movies).  Vincent Fourmond has also been an active developer of Tioga for sometime now.  He has created a command-line plotting program, Ctioga that you should check out.



From e-mails

"Congratulations with Tioga's alpha release! I installed it without any hitch whatsoever, and also ran the tests, with the outcome being exactly what you showed." ­ Piet Hut

"I downloaded the code and installed it. No problems -- I was able to run the test case just fine. I'm running Fedore Core 3. I scanned over the tutorial: it is written _very_ nicely, with a mix of examples and explanations which make it easy to understand. That's a very nice job." ­ Michael Richmond

"The first time I looked to the code (without looking at the tutorial because I usually don't like tutorials), I thought that there could be more comments in it because it's not crystal-clear for a beginner in ruby ... But the tutorial is really fun and understandable." ­ J.J. Fleck

"It took a long time before I dared to try Tioga (I knew about it when it was packaged for Debian). And I find it a very nice tool. Thank you for developing and maintaining it. It is really a joy to produce high quality scalable plots with properly written labels, colormaps and contours." ­ Sergey Astanin



Mailing Lists

There is a mailing list for information about Tioga such as new releases, new documentation, etc.   Please subscribe at tioga-news before sending mail to tioga-news@rubyforge.org.

There is also a mailing list for comments, questions, and answers concerning Tioga.   Please subscribe at tioga-users before sending mail to tioga-users@rubyforge.org.

Tioga is beginning to develop a user community.  There are even projects being started by "user-developers" for things such as a new command interpreter, better support for doing "simple" things like plotting function values, and even a 3D plotting layer to go on top of the 2D Tioga graphics.  Come join the fun!



System Requirements and Installation Instructions

• Requirements
You'll need to be using either Mac OS X or Linux.  In addition, both pdflatex and Ruby must be on your Unix shell path.  If you don't have them, read on for details regarding how to install them.  If you have pdflatex 1.11 or later and Ruby 1.8.2 or later, you can skip this section and go on to the next one about downloading Tioga.
• pdflatex 1.11 or later
Documentation about pdftex and pdflatex can be found here.

To check your pdflatex version, enter 'pdflatex -v' to the shell.  You should get something like "pdfeTeX 3.141592-1.30.4-2.2" where the "3.141592" is perhaps familiar to you, and the rest is the version number we're interested in.  Last time I looked, the version number was up to 1.30.4, so if you're still using 1.10 or earlier, it is time to upgrade.  (The older versions of pdflatex give Tioga problems with things like images, so it really does matter!)

Downloading of current versions can be done at www.ctan.org.   Alternatively, I have had good success following the TeXShop download instructions for obtaining TeX for the Mac and the other necessities including pdflatex.
What about ps and eps files?   One approach is to run ps2pdf or eps2pdf to convert them.   For a discussion of the process, visit the site LaTeX, PostScript, and PDF.
• Ruby 1.8.2 or later
What's Ruby?  Click here for an answer.
And there's lots more help and documentation about Ruby at ruby-doc.org.

If you think you have Ruby but aren't sure which version, type 'ruby -v' to the shell to find out.  You really do need at least version 1.8.2.

Here's a good source of information about how to download Ruby.   When I recently upgraded to 1.8.6, I had good luck using the Ruby One-Click Installer for OSX.

After getting the new Ruby installed, it is a good idea to do 'which ruby' and 'ruby -v' to make sure you're now getting the right one.  For example, I had to add '/usr/local/bin' to the front of my PATH to make things work properly.



Downloads

Current release of Tioga can be downloaded at RubyForge:Tioga.   The tar file has sources for building the Tioga kernel on Linux or Mac OS X.   A Tioga Droplet is also available to provide a simple drag-and-drop interface to open a file in irb_tioga (requires version 1.4 or later of tioga).   Finally, an "alpha" version Mac Tioga GUI is available to provide a point-and-click viewer interface (requires Tioga version 1.5 or later and MAC OS/X 10.5 or later).

After doing the downloads, please read the Tioga_README file and follow the installation instructions you'll find there.   Once you've installed Tioga and have pdflatex and Ruby available on your Unix path, the next stop is the tutorial.

Previous releases available at RubyForge:Tioga




Ctioga

Ctioga is a powerful command-line plotting system based on Tigoa.  It is being developed by Vincent Fourmond, one of the Tioga implementors, and the website includes a tutorial written by Jean-Julien Fleck, a long-time Tioga user.  Check it out!
For linux users, there's useful info about Tioga, Ctioga, and more at



Examples

Here are a few examples made using Tioga.  The tutorial has lots more, with discussions of the code that makes them.









And just as an appetizer, here is an MPEG4 movie made using Tioga plots from EZ, my stellar evolution program: Entropy Profile (7MB)   If you need to get a viewer for MPEG4 on Linux, Michael Richmond tells me that "mplayer" works well for him.  It can be downloaded here.


Bill Paxton's home page