Drawing graphs using tikz/pgf & gnuplot

Combining the tikz package with gnuplot allows you to plot graphs without ever leaving your favorite editor.  Adding the tikz package is straightforward as with other LaTeX packages but everytime I run into trouble installing gnuplot.  As far as I can tell the following steps are sufficient and necessary to get tikz and gnuplot to play nicely together.

  • Download gnuplot and unzip in some folder, e.g., C:\gnuplot.  Subsequently add C:\gnuplot\bin\ as a path to your environment variables.
  • If you have downloaded the windows version of gnuplot then change the name of the executable from ‘wgnuplot.exe’ to ‘gnuplot.exe’.
  • gnuplot may be prevented from writing in the current directory when it is called by tikz.  Use the –enable-write18 switch when compiling your document, e.g., pdflatex –enable-write18 foo.tex.  If you use WinEdt, the switch can be added under Options-Executions Modes.   Note that the first ‘-‘ in –enable-write18 should be two ‘-‘.
  • gnuplot doesn’t seem to like spaces in filenames.


Comments (3)


Bibliography style for Economics of Governance

This is a simple hack of newapa.bst to confirm with the bibliography style of Economics of Governance. Other economics journals published by Springer, e.g., International Journal of Game Theory, appear to use the same bibliography style. Here are a couple of examples of what the bibliography style looks like (taken from the Economics of Governance homepage):

Journal article:
Kydland, F. E., Prescott., E. C. (1977) Rules rather than discretion: The inconsistency of optimal plans. Journal of Political Economy 85(3): 473–49

Complete book:
Kuran, T. (1995) Private Truths, Public Lies: The Social Consequences of Preference Falsification. Harvard University Press, Cambridge

Contribution in a book:
Schelling, T. (1968) The life you save may be your own. In: Chase, S. B. (ed.) Problems in Public Expenditure Analysis. The Brookings Institution, Washington, D.C.

The bibliography style: ecogov.bst


Comments (0)