Mesh Mess

FEM, CFD, CAE, and all that.

Tag: TEX

Moving to ggplot2 from gnuplot

Finally decided to move to ggplot2, after years’ use of gnuplot. I love gnuplot’s simple and straightforward, though its syntax could be a pain sometimes. All the plots in my previous latex docs are generated from gnuplot, using its nice latex terminal for publication (this is still unmatched by ggplot2, about this in a minute).

One thing that motivates me to use ggplot is Hadley’s book. The idea of grammar of graphics looks very sweet. Another reason is that by moving in R ecosystem I can use sweave to produce dynamic docs for some previosu docs (new docs will be written in org-mode so that’s not necessary). As to this,  another option is to use org-mode (babel) + matplotlib + latex. I love the elegant idea of writing whole thing in org,  and there are plenty examples to check out, see here and here. On the other hand, sweave is just that simple but has been having some long-time problems (some are addressed by knitr). As to matplotlib, it does the work alright, but in my opinion the plots are not as nice looking as those from ggplot.

However, gnuplot and matplotlib have one great advantage against ggplot, which is latex text rendering in plots. Latex rendering is supported by activating the latex option in matplotlib, similar to using latex terminal in gnuplot. While in ggplot, there is no such thing out of box. Workaround includes using tikzdevice (seems the project is in stall) or extrafont, but neither is satisfactory to me. That’s why org-mode gives a straightforward (though not satisfactory) solution by allowing me use gnuplot when needed, at least for a while, because better solution appears.


New encounter, same experience

As a latex user, today I had to work on MS office. The outcome is not unexpected: though I abhor MS office’ disregarding of technical writers’ needs,  I do admire its constant effort of insanitizing us.

Add coffee stains and Homer to a Latex doc

Here are two fun .sty’s from the post at Division by Zero. One adds a coffee stain on any document, and one is for Simpsons.

Talking about Simpsons, world cup just brought Uruguay to people attention, and this clip:

TpX: an elegant TeX picture solution

Just found this nice tool for \TeX. It is almost intuitive for using it adding pictures and plots in a \TeX document. Introduction by author can be found here. Below is a sample pic from its website.