Patrick's Blog
Off to San Francisco
March 19th, 2008Will spend Easter and the week thereafter in the Bay area and come back to Switzerland through San Diego and Las Vegas, where I will also spend some time.
Posted in life | 1 Comment »
Illustrations in LaTeX
March 9th, 2008I really like books with great illustrations (great here means that the font should be the same as in the text etc, probably the best example of such a book is the “The Art of Computer Programming” by D. Knuth). I thus hardly ever felt happy with drawing things in a vector graphics program and always chose to program/typeset the graphics in some sort of programming language. In the past years I’ve played around with different packages/programs for doing this; the list includes:
- Matlab. I like it a lot for prototyping, but the plots usually look crappy. Same is true for the open source alternative octave.
- Gnuplot. Very powerful but the standard outputs usually look really bad.
- PSTricks. Some very impressive examples, but sucks when used in combination with PDF.
- PyX. From the website: “PyX is a Python package for the creation of PostScript and PDF files.” While I liked the Python environment and the power it gives you, it lead to problems when I wanted to include the plots in presentations: the fonts don’t agree or it’s harder to draw edges to other elements on the slides. It just lacked the integration with LaTeX. Note: it’s possible to work around some of the issues like for example the font problem, but usually it feels quite hacky.
- PGF/TikZ. As it’s from the same author who wrote the excellent Beamer package for presentations it integrates nicely with LaTeX and Beamer. It’s supposed to work with both DVI/PS and PDF. They recently released version 2 and by looking and the documentation you can immediately realize the sheer power this package has, especially for drawing general illustrations. It became my tool of choice about a year ago for drawing graphical models and such like, I however didn’t like the plot environment so much (it’s hardly existing at all).
This weekend I then finally played around with the Gnuplot TikZ terminal which addresses my last issue with PGF/TikZ: plotting functions and data. With this tool you can use gnuplot to create the actual plotting scripts and also to create the illustrations. However, instead of producing for example a PDF, the terminal outputs a .tex file that can then be included in the LaTeX document. The actual drawing in the document is then done by PGF/TikZ. The results look truly awesome. The installation is still a little bit messy as it needs the yet unreleased gnuplot 4.3 CVS.
Posted in academics, latex | 3 Comments »