Some commonly needed software resources for economists.
Author

Alan G. Isaac

Keywords

software, economists, software for economists, editors, text editors, matrix programming, agent-based simulation, agent-based economics, Python, LaTeX, PostScript, Vim, graphics, symbolic mathematics

Software for Economists

Last modified: 2025-07-30

Most recent (GitHub) version: https://igit.me/KQmOR

Caveat lector: The following advice comes without any warrantee whatsoever, and the internet being what it is, link destinations may be highjacked or broken. So do your due diligence. And please, confirm any licensing information with the software copyright holders.

The following software list is idiosyncratic, but I have tried to make it generally useful for economists. I favor cross-platform solutions. Suggested changes and additions are welcome.

Two requests:
  • If you use a free and open source software application, please send money to the developers. (Yes, this is an appeal by an economist to your moral sense. Live with it.)
  • Please read Richard Stallman’s Right to Read article, as well as his GNU Manifesto. Many people felt Stallman was over-concerned when he wrote this. Events have been proving him prophetic: including ebooks that “time out” and become inaccessible after fixed hours of viewing, and perhaps most famously an ebook version of Alice’s Adventures in Wonderland that forbade reading it aloud. You may also wish to visit the Free Software Foundation, visit OpenSource.Org, and sign any petitions against software patents.

Thank you.

Text Editors

Every programmer needs a good text editor! All other things equal, cross-platform solutions are always preferable.

Some cross-platform editors:

I recommend Vim. It is highly configurable, available on essentially every platform and quite wonderfully designed. On top of all this, it is charityware: you pay nothing for this excellent software, but users are encouraged to make a donation for needy children in Uganda.
However, many good choices exist, and many prefer the very closely related NeoVim, which has the killer feature of Lua scripting.

Mode-based editing rocks! However, it also takes practice. If you choose Vim or NeoVim (recommended!), be sure to do the tutorial (or possibly this online tutorial).

Because mode-based editing is so powerful, many other editors provide a Vim-mode. This includes Visual Studio Code. Even Emacs provides this, semi-jokingly calling it Evil mode. (Some prefer the closely related XEmacs.)

Python users may want to consider the interesting and powerful Python Tools for Visual Studio in (There is additionally a Vim editing mode.)

There are many cross-platform alternatives. See the Wikipedia article.

Windows users:
The NotePad editor is always available as an accessory program, but it is rather limited for serious use. If you like the basic interface, try the fast and powerful Scintilla-based NotePad++. (License: GPL) For pure speed on a Windows platform there is the powerful VEdit. If you can afford it, there is also Lugaru’s Epsilon, a powerful and fast yet lightweight editior with an extensive emacs-style command set.

Historical Aside: you can still get the traditional vi editor, which has been free and open source since 2002.

Stream Editors

The only stream editor I have experience with is sed, which is very fast, powerful, and cross platform. (License: GPL) For an introductory tutorial, try SED: A Non-interactive Text Editor. If you decide to use sed a lot, you may wish to try sedsed, a Python-based sed debugger.

Fonts

Monospaced Fonts

Rate your programming font for readability and reducing eye strain. Then decide if you need ligatures. (Programmers should always examine this character sequence: Il1aoe0O.) Here are some popular programming fonts.

  1. JetBrains Mono is my curren favorite: Designed by JetBrains to minimize eye strain, it features tall lowercase letters and excellent spacing. Available with and without ligatures. Great charater differentiation.
  2. Fira Code: good ligatures.
  3. Cascadia Code: modern look; good ligatures.
  4. Source Code Pro: professional look.
  5. Hack: airy look.
  6. Monaspace: designed by GitHub.
  7. Inconsolata: minimalist look.
  8. Ubuntu Mono.
  9. Consolas.
  10. DejaVu Sans Mono.

Other Fonts

I must note the wonderful Scientific and Technical Information Exchange (STIX) font project. These are “a comprehensive set of fonts that serve the scientific and engineering community”. and are available under a royalty free (and fairly liberal) license. (TeX users should check these out!) The fonts were released in May 2010 and updated in 2016.

Here are MiKTeX installation instructions from Ulrike Fischer:
  1. Unpack the zip-file somewhere outside miktex. You will get a folder stix-tds
  2. Add the folder stix-tds as a new root in miktex - settings, tab “roots”
  3. Activate the stix.map file either in a document with \pdfmapfile{=stix.map} or globally by following the instructions in the documentation
  4. Test the font with this document:

    \documentclass{article}
    %\pdfmapfile{=stix.map} %if the map file is not activated globally
    \usepackage{stix}
    \begin{document}
    Some text, and a math formula \(a+b=\sqrt{c}\).
    \end{document}

Other Useful Fonts

  • Gentium Plus is a high-quality FOSS unicode font set with some math-symbol support.

  • The Arev fonts are designed to be useful for presentations containing math.

Spell Checkers

The most natural approach to spell checking is modular, but many editors nevertheless include their own spell checker. If yours does not, there are many free options. Perhaps the most obvious cross-platform option is Aspell. (If you will use the Windows release, see Aspell hints.) Aspell derives from the more famous ispell. (There seem to be separate implementations of ispell for Unix and OS/2 and ispell for Win95/NT. You can also try jspell in a DOS environment.) If you need a spell checker for general Windows applications, try All-Purpose Spell Checker or Spell Checker for Edit Boxes. (They are free.)

Vim 7+ includes a spell checker. You can also integrate Vim with aspell, which is my preference.

Dictionaries and Thesauri

These days, your favorite dictionaries and thesauri are probably available free online. My favorite crowd-sourced dictionary is Wiktionary, which is remarkably good, even for etymology. My favorite commercial dictionary is The American Heritage® Dictionary of the English Language. The DICT Development Group offers a free online dictionary that provides a fast, convenient interface to the Collaborative International Dictionary of English. In addition, you can submit a query for “yourword” directly as http://www.dict.org/bin/Dict?Form=Dict1&Query=yourword&Strategy=*&Database=*. Windows users can download for free the Freelang translation dictionaries.

Aiksaurus is a powerful, free, cross-platform thesaurus. Windows users can download WordWeb for free.

Integrated Development Environments (IDEs)

Scientific Documents

Basic Production Considerations

Scientific documents will generally include typeset mathematics. Proper typesetting aids communication, and ISO31/XI therefore provides typesetting standards. (See Claudio Beccari’s discussion, but also the thread on StackExchange.)

There are three basic approaches to producing mathematical documents.

  • WYSIWYG: What you see is what you get. Generally this means you will use a word processor that provides support for mathematics. Your printed document will look very similar to the document view in your working environment. (Which often means it is not typeset very well.)
  • WYSIWYM: What you see is what you mean.
    Generally this means that your working environment will be a user-friendly graphical interface to an underlying typesetting language. Your printed document will look somewhat similar to the document view in your working environment, but substantial formatting will be added to the document when it is typeset.
  • WYSIM: What you see is markup. Generally this means that your working environment will be your favorite text editor, and you will create a plain text document that incorporates markup commands to induce formatting and the typesetting of special symbols. Your printed document will look quite different from the document view in your working environment. Substantial formatting will be added to the document when it is typeset, and your markup commands will not be visible in the typeset document.

Document Exchange

We exchange documents for three primary reasons: for viewing, for interaction, and for modification. Word processor formats are a popular choice, and the versioning capabilities of modern word processors can be very useful in a collaborative setting. Plain text can often satisfy viewing and modification needs, and there are great version control tools for text formats. When more structure is needed, HTML will usually suffice. When formatting must be tightly controlled or access needs to be controlled, PDF is often a good choice.

WYSIWYG

A good cross platform solution is Open Office, which includes the oomath formula editor. Open Office is free and open source software.

Another cross platform solution is AbiWord, which brilliantly uses MathML as its internal representation of mathematics. AbiMath can import MathML equations. AbiWord also support itex for equation input, which is quite wonderful.

For Windows users, the most common approach is Microsoft Word with embedded OfficeMath equations. Unfortunately for old documents, new versions of Word no longer support Equation Editor 3 or earlier. Unfortunately, many journals do not allow embedded equations in submitted articles. This is a rather clumsy environment if your writing includes much mathematics, but it is widely used.

WYSIWYM

Some working environments allow you to see your mathematics in a form closely related to how it will be printed, while reserving polished document formatting to a separate “typesetting” process. Anyone who has printed a web page is familiar with the difference between the screen display and the typeset printed version (or “print preview”) of the document: just imagine directly editing such a screen display before typesetting your document. These are sometimes called WYSIWYM (what you see is what you mean) environments.

LaTeX Interfaces

The most popular WYSIWYM environments are interfaces to an underlying LaTeX document. In such an environment, you will see for example the glyph β instead of the LaTeX code \beta.

The only cross-platform implementation I know of is LyX. Additionally, LyX can interface with the Maxima computer algebra system. (Just add the path to Maxima in Tools » Preferences » Paths.)

An interesting alternative is TeXmacs. TeXmacs connects to several computer algebra systems.

Windows users appear to have a number of commercial choices, the most popular of which seems to be Scientific Word. (Scientific Notebook is not marketed as a LaTeX front end, but as of 2004 it still saves in LaTeX format and with a tiny amount of editing can be used that way.)

As a commercial option, Mathematica notebooks can also be used as an WYSIWYM interface for mathematical documents, with some support for LaTeX, Markdow, and MathML export.

WYSIYM

The most powerful way to produce mathematics is to learn a markup language for type-setting mathematics. In this case, what you see is your markup (WYSIYM). This also provides a big advantage for the process of writing: you get to use your favorite text editor and thereby get access to powerful editing facilities. The most popular choice is LaTeX, which is almost the universal WYSIYM choice among mathematicians, physicists, and economists.

Using LaTeX allows you to easily take appropriate control over symbol formatting.

LaTeX Alternatives
  • Quarto is great for multi-format document generation and reproducible reports.
  • Typst is up and coming for very fast PDF generation with very good math support.
  • Lout is much less widely used but has some strong advocates.
  • Some people insist that EQN and GROFF remain the right way to typeset mathematics.)

Meta Formats

There are a number of efforts to provide a meta-format from which both LaTeX and XHTML/MathML documents can be generated. The most widely recognized options are probably Markdown and ASCIIdoc. A particularly interesting and powerful option is Quarto, which leverages pandoc for an extended Markdown synatx that nicely supports math, figures, tables, and citations. Strongly recommended.

reStructuredText

restructured text (reST) nicely supports math, figures, and tables. However, its lack of real citation support is often a deal breaker. (To add some simple citation support, see bibstuff.)

For HTML output, use the rst2html5 writer. For PDF output, use the rst2latex writer to produce LaTeX, and then use pdflatex (or luatex) to produce the PDF. (Alternatively, rst2pdf produces PDF directly using the ReportLab library.)

TeX Distributions

There are many commercial and freeware LaTeX distributions for all platforms. Each comes with its own installation instructions, which you must be sure to follow step-by-step. For Windows 2000 and XP, I have had wonderful experiences with the freeware MikTeX, which has managed to make installation a virtually painless 15 minute process if you read the readme and the prompts.

TeX Live provides a comprehensive TeX system for most systems. BaKoMa TeX is an inexpensive distribution for Win95 that got some good press, and it includes PostScript versions of the Computer modern fonts. (A very nice feature.) You can purchase a TeX system (with a lot of other useful stuff) from NTG as 4allTeX.
Mac OSX users: use the i-Installer! You can also look at Gerben Wierda’s teTeX port to OS X comes with an i-Installer installation program and gets great reviews. As a front end, consider Richard Koch and Dirk Olmes’s TeXShop.

TeX Tools

MiKTeX tools have been released for UN*X systems.

Learning TeX

Novices can get acquainted with LaTeX by looking at a tutorial. Once you are using some version of LaTeX, you are likely to find LaTeX: A Document Preparation System by L. Lamport to be indispensable. There are many other good books on TeX and LaTeX. The free lshort2e.pdf has most of what a novice will need. (Check for the most recent version.) More detail can be found in Making TeX Work and many other excellent books. If you need to write your own class (and you probably do not!) try clsguide.pdf.

Users with questions should check the LaTeX FAQ, and the LaTeX homepage. If you are sure you questions are not answered there, ask on the comp.text.tex newsgroup. CTAN and the CTAN-Web, also offer a wealth of information about TeX and LaTeX. (Be sure to visit Graham Williams’s catalogue of information.) You may also find some useful TeX Information at UCC. If you get truly ambitious, Victor Eijkhout’s TeX by Topic is now available online. (Most users will never need such a detailed understanding of TeX, however.)

Compiling TeX

Assuming you want PDF output, use pdflatex or luatex.

To automate multiple compilation stages, consider using the just command runner. (For complex compilation needs, you might use scons, but it is usually overkill.)

LaTeX IDE

I honestly do not see a need for a LaTeX IDE. If you are satsified with WYSIM, get a good plugin for your editor. If you prefer WYSIWYM, use LyX.

LyX hints:
i. If you are using Subversion for version control, make sure you set svn:eol-style to native on your .lyx files.
ii. To edit the LaTeX preamble, go to Document » Settings » LaTeX Preamble.

Nevertheless, IDEs remain popular. There are many: Wikipedia has a list. Here are three that are popular.

  • LaTeX Workshop is a plugin for VSCode that produces an IDE experience.
  • TeXnicCenter is a popular LaTeX IDE for Windows™ users (License: GPL).
  • TeXworks is a popular cross-platform LaTeX IDE that ships with MiKTeX (License: GPL).

Adding drawings to LaTeX documents

LaTeX provides a basic picture environment that is pretty powerful. Still, you will often need more. You can easily include PDF, JPG, or PNG images in your documents. See Graphics for LaTeX for more details.

LaTeX Format Conversion

From LaTeX

Always start your format conversion journey by asking whether pandoc (Language: Haskell; License: GPL) is adequate to your needs.

LaTeX to Word

See this blog for a LaTeX-to-Word example using pandoc.

If you use LyX, there is a LyX (via LaTeX) to Open Document Format converter.

In addition, you might have luck producing a PDF from your LaTeX file and then converting the PDF to Word.

Since this conversion is a common need, a web search will reveal many other converters.

LaTeX to HTML

Note that a successful translation into HTML or MathML can subsequently be read by any modern word processor. (Of course it will not look as good as in LaTeX!)

  • LaTeX2HTML is a popular approach.
  • Ian Hutchinson’s TtH translator, which does amazingly well in converting TeX math to HTML using the built-in fonts of your computer. There is also a TeX to MathML converter.e., as soon as more browsers and word processors support MathML).
  • HeVeA converts TeX to HTML 5.
  • Version 5+ of Scientific Word offer substantial abilities to importing LaTeX and export MathML.
  • LyxPort translates .lyx files to HTML (using pandoc).

To LaTeX

  • Version 5 of Scientific Word (and possibly Scientific Notebook) offers substantial abilities in importing (and exporting) rich text format (RTF) documents. Scientific Word reads many LaTeX files, so this offers some format conversion possibilities.
  • rtf2latex2e translates rich text format (RTF) into LaTeX. Claims to handle text formatting, tables, figures, and equations, and to produce LaTeX files that are quite readable and suitable for editing.
  • Writer2LaTeX converts Open Office and Star Office documents to LaTeX, including any formulae.
  • Chikrii Softlab’s shareware Word2TeX is an output filter for Word that converts even tables and math. It has some minor bugs that can be fixed by manually editing the TeX output. They now offer a TeX2Word conversion as well.
  • Spreadsheets to LaTeX:
    calc2latex converts OpenOffice spreadsheets.
    Excel2Latex converts Excel spreadsheets to LaTeX and retains quite a bit of formatting information.
  • ltx2tcx will process a LaTeX document, examine included files and make use of the associated generated .aux and .bbl files to produce a collection of techexplorer enhanced .tcx files.
  • TeXML converts XML to TeX.
  • AntiWord converts Word to plain text, which you can use in your LaTeX documents.

Presentations

Most existing presentation applications have serious limitations.
  • Editing is slow
  • Reformatting is cumbersome.
  • Content revision cannot easily be automated.
  • Math handling is mediocre.

On the other hand, for short one-off bullet-point presentations, with a few images, these applications are very easy to use. (E.g., you can just paste your images into a variety of templates.)

Two very interesting notebook-based approaches to presentation building are Mathematica and JupyterLab. Mathematica is a powerful commercial symbolic algebra package which supports interactive presentations using the Wolfram Language. Mathematica pioneered notebook interfaces, which have since become very popular. Jupyter is a FOSS notebook web application that can serve as a front-end to dozens of languages, including Python and Julia. The Jupyter Book project provides tools to convert a collection of Jupyter notebooks into publication quality documents.
To install JupyterLab with pip (at the command line):
pip install jupyterlab
To run after installing (at the command line):
jupyter lab
For speed and ease of editing, it is nice to create presentations with a text editor. This means implies audio and video content will be included by explicitly linking to the underlying files. Some obvious candidates are
  • reStructuredText with an appropriate slide writer
  • LaTeX with an appropriate document style.
  • combine the previous two suggestions with rst2beamer
  • MagicPoint (X11-based, BSD license) Nice, but development seems to have stopped.

A fuller discussion of options can be found in Wiedman on Screen Presentation Tools. Here are some options using reStructuredText.

- rst2pdf http://lateral.netmanagers.com.ar/stories/BBS52.html
  (Good math handling via Matplotlib's mathtext!)
- rst2s5 http://docutils.sourceforge.net/docs/user/slide-shows.html
  http://docutils.sourceforge.net/docs/user/slide-shows.html
  http://www.python.org/doc/slideshows/5min-reST-demo.txt
- Bruce http://pypi.python.org/pypi/bruce
  http://sites.google.com/site/r1chardj0n3s/howto
  (You can embed a Python interpreter in your presentation page!)
- rst2odp http://panela.blog-city.com/rst2odp_on_pypi.htm
- rst2beamer http://www.agapow.net/programming/python/rst2beamer
  http://home.cs.siue.edu/~rkrauss/python_website/
- rst2slidy (cannot find it, but here's Slidy:
  http://www.w3.org/Talks/Tools/Slidy )

Roberto Alesina mentions that if you choose rst2pdf then fancy transitions are hard, handouts have to be a separate document, there is no way to easily center something vertically, and you need to create different versions for different screen aspect ratios. (On the other hand, everything end up in a single file, your PDF can play almost anywhere, and you know exactly how it will look.)

If you know LaTeX, the beamer is great, and you can compile beamer presentation directly with pdftex. (I found getting started with the beamer document class using MiKTeX’s pdflatex to be completely painless.) Some people prefer powerdot (which supercedes Prosper). With powerdot you will need to go .tex to .dvi to .ps to .pdf. (Many integrated TeX environments can automatically implement that sequence for you.) Some people like the commercial Utopia presentations bundle.

  • For presentations, using PDF files (with Acrobat Reader or even GhostView or xpdf) as the viewer is superior to relying on your dvi previewer. You can produce PDF slides with pdflatex or dvipdfm. A decent, very simple approach is to use the landscape option for the slides class (or better yet use the Prosper class) and then make sure the PDF files know about the page size. One normally passes such information through the .dvi via commands. Dvipdfm understands only commands that start with “pdf:”. The documentation of dvipdfm gives the following example for landscape pages (letter size paper):

    More generically (with the landscape documentclass option):
    In pdf{la)tex there are several commands (all starting …) that function similar to . For example
      \setlength{\pdfpagewidth}{11in}
      \setlength{\pdfpageheight}{8.5in}
    
    should give you a landscape slide (on screen) in pdflatex. You may need to specify in AcroRead’s print dialog you want the page rotated to print properly.
    See David Story’s discussion, which I rely on here. Once you have developed your slides, you can use either the freeware PPower4 (a pdf post processor written in Java) or texpower, which can be used to create dynamic effects and works well with pdfslide, pdfscreen, and other slide design classes and packages.
    Btw, if you are using both latex and pdflatex, then you probably want to omit your .eps and .png file extensions and add a command to limit the possible extensions to these (otherwise latex may try too many extension, wasting time and pool space). The grfguide and epslatex.pdf cover the command.

There are a few open source presentation programs that are not LaTeX based. They are more like using PowerPoint. OpenOffice includes a presentation program. GNOME Office includes Agnubis, but it is still work in progress.

Another simple but powerful possibility. The ReportLab Toolkit includes PythonPoint for presentation creation. It is amazingly powerful, but a bit complex. To make things much easier, you can very simply generate PythonPoint documents from restructured text (reST). Once you have the software installed, this is about as easy as it can get!

Presentations via RestructuredText

You can produce very nice presentations using reStructuredText with one of it presentation oriented writers.
  • S5 or S5 Reloaded. (License: GPL)
  • Bruce is a very interesting presentation option. It supports images and video, and even interactive Python sessions.

S5 [2] can simply create beautiful browser based presentations. Instead of editing HTML you can use reST and convert the text file to a slide show with rst2s5. Also see S5 Reloaded and AJAX-S.

Falling short of a presentation package but still potentially useful for report writing is PyReport, which compiles a Python script and its (textual and graphical) output into a PDF file.

Last but not least: for incredible animated presentations, the technically inclined may consider Slithy.

Tables

One place where a good GUI is nice is for the visual formatting of tables. Here a nice GUI can provide a real advantage over markup. This need not mean abandoning the beautiful output of LaTeX.

LyX supports table editing. (You can also copy table data from spreadsheets to LyX.)

(Commercial options include Scientific Notebook and possibly LaTeX Tables.) When the structure and content of the tables is the dominant consideration, however, LaTeX tables can often be easily and automatically generated. For example, many econometric packages will produce LaTeX formatted tables of results.

If your chosen econometric package does not support LaTeX table generation, you still have a variety of options.

Meta Formats for LaTeX

Other TeX Resources

There are extensive citation management resources.

  • AMS TeX Resources

  • AUC-TeX is a much enhanced LaTeX mode for GNU Emacs.

  • The flexible indexing system Xindy is a replacement for makeindx.

  • CTAN stores diverse TeX resources.

    • I’ve often needed endnotes.sty to produced endnotes for a paper.
    • Academics may be interested in Mike Piff’s answers package (answers.sty).
Citation Management

The current choice for citation management appears to be Biber+Biblatex. (Other possibilities are discussed below.) The traditional choice for citation management is BibTeX. (See the BibTeX user hints.)

Here is how to transition from the traditional Bibtex with natbib to the more modern Biber with biblatex. (If you have not been using natbib, you can leave out that option.) After changing your LaTeX document as indicated below and compiling it with pdflatex as usual, run biber on the document’s basename (instead of using Bibtex).

\documentclass{article}
%\usepackage{natbib} %REMOVE natbib package
%ADD biblatex package (with Biber backend)
\usepackage[
  backend=biber,
  style=authoryear-comp,
  natbib=true,
  sortlocale=en_US
]{biblatex}
%ADD .bib files (one by one, in preamble)
\addbibresource{mybib.bib}
\begin{document}
Lorem ipsum dolor \dots
\printbibliography %ADD printbibliography command
%REMOVE old bibliography commands
%\bibliographystyle{mystyle}
%\bibliography{mybib}
\end{document}

In the background, the choice of the biber back end for biblatex will lead to to the creation of a .bcf file, which biber operates on. But you should not need to know about this unless choose to pass to biber the full filename (basename + .bcf) instead of just the basename. In your document, you will need to keep the natbib option to biblatex as long as you use natbib style citation commands. Or you can replace all your citet and citep commands with textcite and parencite commands.

  • JabRef is a cross-platform GUI for managing BibTeX/Biblatex databases (Language: Java 1.5+. License: GPL.) Recommended. You can directly use the web version. The documentation also includes very simple installation instructions.
  • Pybtex is a Python implementation of BibTeX. Provides translation across formats, including a nice YAML format. (License: GPL, Language: Python)
  • If you need to hack a BibTeX style, you will need btxhak or the Custom-Bib package.
  • VerTeX for Economics Journals.
  • Zotero is a remarkably capable FireFox extension for research resource management (including citation). (It is worthwhile to watch the short video introduction on their homepage to get a feel for Zotero’s capabilities.)
  • kbibtex is a nice looking and functional BibTeX editor.
  • Pybliographer is a cross-platform (but not yet for Windows, unfortunately) tool for managing bibliographic databases. It can be used for searching, editing, reformatting the following file formats: BibTeX, ISI, Medline, Ovid, Refer.
  • You can use BibTeX Database Manager (BibDB) (which has a mailing list) to manage your citation database.
  • Some alternatives to BibDB: BibTeX Manager
    Rich Ertel’s Bibmaker
    Jonas Bjornerstedt’s BibEdit
  • Mac users can consider BibDesk.

Agent-Based Simulation

Newcomers to agent-based simulation usually start with NetLogo unless they have a good amount of programming experience. It includes an extensive Models Library. While NetLogo’s builtin statistical and mathematical support is limited, you can link it to R or link it to Mathematica. Additionally, NetLogo supports Java extensions and can be run by Java programs.

Other agent-based modeling tookits:

Python:
Mesa

gridworld is a Python module providing some of toolkit functionality of NetLogo. (E.g., spatial and stationary agents; simple GUI construction with button, sliders, plots; etc.) Examples of the use of gridworld can be found in a supporting paper, along with a set of template models for exploring agent-based modeling.

Julia:
Agents.jl
Objective C:
Swarm is a famous and flexible platform for multi-agent simulation projects, originally written at the Santa Fe Institute in the mid-1990s. (Language: Objective-C or Java; License: GPL) Although the platform is extremely capable, use of Swarm seems to be declining, and there appears to be little ongoing development.
Java:
After NetLogo, perhaps the most popular multi-agent simulation toolkit is Repast. (License: New BSD; Language: Java or C++)
Java Agent-based Simulation (JAS) library attempts to reimplement Swarm in pure Java.
C++:
Evolving Objects is “is a templates-based, ANSI-C++ compliant evolutionary computation library”. (License: LGPL)

NetLogo Resources

Here are some useful NetLogo books:

Scientific Programming Languages

Most day-to-day scientific programming is done in very high level languages. Two factors to consider in making a language choice are what software in your area is already written in the language, and how much original coding you plan to do.

Data Exchange

Please let us stop playing nationalist games with number formats before someone gets badly hurt as a result. For scientific data exchange, the decimal separator is a point (ASCII 46). It is not a comma (ASCII 44). Neither is it any other UTF code point. It is just that simple. Pretending otherwise is like pretending that science does not use the metric system.

For those not working with big data, the most widely used data exchange format is comma-separated values (CSV). There actually is a standard, in the form of RFC 4180. Sadly, many files with the .csv extension do not conform to this standard, so caveat emptor.

Possibly the simplest open standard for fixed periodicity time-series data is the open-databank standard. Most time series econometrics packages support some version of this.

HDF5 “is a general purpose library and file format for storing scientific data”. Some support can be found in the econometrics community, both in commercial and free packages. Python users have excellent support via PyTables. (To use PyTables with Python 2.4 in Windows platforms, you will need to get the Windows binaries.) Octave and R provide HDF5 support. Commercial applications supporting HDF5 include Mathematica and MATLAB version 6.5+, among many others.

The netCDF libraries “support a machine-independent format for representing scientific data”. The netCDF distribution includes interfaces for C, Fortran77, Fortran90, and C++, and interfaces are reportedly available for Ada, IDL, Java, MATLAB, perl, Python, R, Ruby, Tcl/Tk. The interface provided by ScientificPython is supposed to be excellent. PyNIO adds to this support of additional formats. Another possibly faster way to read the netCDF format is pupynere, a pure Python solution. (License: MIT)

Julia for Scientific Programming

Julia is probably the right choice for those looking for an alternative to Python and R.

Python + NumPy + Matplotlib + SciPy

A key reason why Python rocks for research is the NumPy array multi-dimensional library (License: BSD). NumPy is a very high quality library, and it has become my favorite approach to matrix (and multi-dimesional array) programming. This Python package is written as a C extension, so it is very fast. This means you can have full access to the ease of use and to the object-oriented power of the Python programming language while doing serious scientific programming.

Additionally, an extensive scientific computing environment is provided by SciPy. (License: BSD; Dependency: NumPy.) For publication quality graphics, add the excellent graphics package Matplotlib. (License: BSD; Dependency: NumPy.)

Nowadays, best practice often involves creating a virtual environment for each Python project, often using the uv package and project manage. Nevertheless, many Python users will be well served by a Python distribution that packages together everything they need as a single install. For example: NumPy, SciPy, and Matplotlib (as well as much more) are included in the following distributions.

Many scientific programming applications can be found on the SciPy Topical Software Wiki. ScientificPython offers some useful scientific and visualization modules. The are also some additional probability and statistics utilities available. Pycoin provides a Python interface to some of the COIN operations research packages. Additional functionality can be obtained from the NAGpy interface to the NAG Fortran library or the PY-ML interface to Mathematica.

Python also has modules for interacting with gnuplot and R. You may also want to see the If you need to build GUIs as part of your Python project, consider the Boa Constructor. Additional Python stuff you might find useful for scientific computing: PAIDA (a Python implementation of the AIDA abstract interface for data analysis), The Modular toolkit for Data Processing (MDP) is a Python data processing library implementing Principal Component Analysis (PCA), Independent Component Analysis (ICA), Slow Feature Analysis (SFA), and Growing Neural Gas (GNG).

Being able to write code in one matrix programming language and run it in another environment can be useful. Examples include Treiber’s pym Python program for converting MATLAB to Python, Cameron Rookley’s gtoml Perl program for converting Gauss code to Matlab, and Christopher Stawarz’s i2py script for coverting IDL to Python.

Julia

  • Julia is a promising “high-level, high-performance dynamic programming language for technical computing”. (License: MIT) This is a very interesting and powerful language, which is already popular among economists. Follow the platform specific installation instructions. It is also possible to add Julia to a Jupyter notebook.
  • Java for Scientific Programming

    Java does not seem to have any eqivalent of Python’s SciPy package for scientific programming. Pieces of the functionality can be obtained as follows. (But stick with Python’s SciPy if you can.)

    • Apache Commons Math for some basic linear-algebra and optimization functionality.

    • Colt for multi-dimensional arrays and basic statistics.

    • NOAA’s Scientific Graphics Toolkit.

    • Java Numerics includes a Java Matrix package.

    • The Fortran to Java project offers a Java version of the LAPACK routines.

    • VectorZ provides fast double-precision vector and matrix math and supports n-dimensional arrays.

    • Parallel Colt provides support for dense and sparse linear algebra. This is a dependency of Incanter, which provides statistical data processing and visualization functionality.

    • Deeplearning4J suite includes ND4J, a library for scientific computing on the JVM. (License: Apache 2.0) Emphasizes Python interoperability.

    It is also worth mention that Jython implements Python 2.7 as Pur Java, allowing the ease of Python scripting to be combined with the power of Java.

    Getting started with Java:

    Download the Java Development Kit (JDK), which includes the Java Runtime Environment (JRE). On Windows, you install this by running the downloaded executable. Then download Eclipse, which is an IDE that is popular for Java development. You “install” Eclipse simply by decompressing it. (E.g., on Windows, just unzip it. It does not make any registry changes.) Eclipse comes with tutorials. For a simple overview of installation, consider this online video.

    For very simple introductions to Java (suitable for those without programming skills), try David Eck’s free book and/or Java Programming for Kids, Parents, and Grandparents.

    Other Free Matrix Programming Languages

    • Perl Data Language introduces a new data structure: the “PDL numerical array,” often referred to as a “piddle.” A piddle can contain a large block of efficiently-stored numbers for manipulation with normal mathematical expressions. Each operation is implemented via compiled C code, so it’s nearly as fast as a C program.
    • Verson 3.12 and prior of the LAPACK numerical linear algebra subroutine library is available from the Netlib Repository at Oak Ridge National Laboratory.
    • Matrix Template Language 4 (MTL4) provide matrix manipulations for C++ users.
    • ROOT is an extremely capable “object-oriented data analysis package” developed at CERN. (License: LGPL; Language: C++) Root offers a Python interface to all its components!
    • SciLab, a free MatLab-like numerical computation package. (It also has capabilities in symbolic mathematics, especially polynomials and polynomial matrices.)
    • Yorick is a fast, cross-platform, interpreted matrix programming language that is primarily used in physics. (License: BSD) Yorick includes the Gist graphics package, which can be used separately. For example, PyGist provides a Python interface to the Gist graphics package. This allows extremely fast graphics plotting.
    • Octave is a high-level language, resembling MatLab, primarily intended for numerical computations. Octave is free and open source software. It provides a convenient command line interface for solving linear and nonlinear problems numerically. It is possible to install Octave under Windows, but the Windows installation of Octave is a bit large since it includes an installation of Cygwin. Octave uses gnuplot for plotting.
    • Euler Math Toolbox (EMT) supports matrix computations with a focus on the production of high quality graphics. Euler also provides symbolic math via Maxima and offers a notebook interface. (License: GPL)
    • Ox is similar to C++ and the econometric implementations resemble GAUSS. Ox comes with a Gauss-to-Ox translater called OxGAUSS.
    • J is a powerful array-oriented functional language. (License: GPL) The APL-influenced syntax is rather unusual.
    C and C++:

    eigen is a widely used “C++ template library for linear algebra”.

    FLAME is a high-performance dense linear algebra library. A C-based alternative to LAPACK and BLAS.

    newmat is a C++ matrix class written by Robert B Davies. Dirk Eddelbuettel’s review of using C++ and the newmat08 matrix classes for econometric purposes notes that it is free and portable (as is the gnu C and C++ compiler), being real C++ it can be linked with other C, C++, or Fortran (using f2c) libraries you happen to use, and once it is compiled it runs faster than the obvious alternatives.

    GNU Scientific Library (GSL) includes linear algebra components. (Note: PyGSL provides a Python interface to GSL.)

    The Template Numerical Toolkit (TNT) is “a collection of interfaces and reference implementations of numerical objects useful for scientific computing” offered free by the NIST.

    General Purpose Programming Languages for Economists

    This is an extremely short selection of possibly useful free programming languages.

    If your emphasis is computational, you will want to visit NIST’s Guide to Available Mathematical Software and the Netlib repository.

    Python

    I use Python whenever possible, which is almost always. (The main exception is when execution speed is at an absolute premium in computationally intensive projects.) Once thought of as primarily a scripting language, Python has evolved into an extremely powerful very high level general purpose programming language. It is still useful (indeed, a first choice) for scripting. (Use it to find out why.) In addition, Python has excellent support for scientific computing. The online documentation is excellent. If you lack programming experience, try Byte of Python before trying the Python tutorial. Also, if you prefer video tutorials, Microsoft has assembled a multipart video introduction.

    One other note: although it is an interpreted language, you can compile Python. Interesting graphics and numerical libraries have been developed for Python.

    Go

    Whenever you find Python too slow, which is probably because you need either extremely loop-intensive algorithms or enormous concurrency, try out Go. Go includes very basic linear algebra support via gonum and some statistics.

    C

    If you are new to C, consider Standard C by Plauger and Brodie. Code Blocks is a “free C/C++ and Fortran IDE” that targets new programmers and works with your existing compiler installation. (Windows users should install MinGW before installing Code Blocks.)

    For C/C++ compilers, you probably want gcc or clang. (Windows users: see Mingw-w64.) However, see Bjarne Stroustrup’s list compilers list.

    Btw, if you program in C/C++, you should probably be using the Cscope code browser. (There is a native Win32 port of Cscope, which works with Vim’s Cscope interface.)

    Notable Additional Compiler Resources:

    • The Watcom compiler is being released as open source.

    • Intel offers its excellent Math Kernel Library free for noncommercial use.

    • Borland’s C++ compiler is now the Embarcadero compiler and is free.

    • SoftIntegration has made its Ch Shell/Interpreter available free for academic users: you can run C/C++ code in an interpreter and get many Unix utilities in addition.

    There is online access to Numerical Recipes in C, but I have had occasional trouble getting through.

    Hackable Games in C: NetHack, derived from the venerable Hack game. Read about in in IEEE Spectrum. See the GitHub repository if you want to hack it.

    Data Formats

    For substantial and complex databases, consider HDF5.

    Other Free Languages

    Languages for Scientific Computing

    In principle you can use any general-purpose programming language, but some have extensive pedigrees for scientific programming. We have alread discussed C above. Certainly C++ and Fortran have to be mentioned. The GNU Compiler Collection (GCC) includes front ends and libraries for these (as well as Objective-C, Java, and Ada).

    F programming language
    a carefully selected subset of the most useful Fortran 95. You can compile F with the g95 compiler: g95 -std=F my_program.f95, available for free from G95.
    Haskell:
    worth considering. The massiv package supports multidimensional array operations. See Graham Hutton’s complete Youtube course on Haskell.
    Scheme:
    Racket is a more feature-rich Scheme dialect. (Probably the right choice for most users.)
    MzScheme is a free and open source implementation for Linux, Mac, and Windows.
    Chez Scheme is open source
    See R. Kent Dybvig’s The Scheme Programming Language, 4th Edition, which is now online.

    Other Useful Statistical Software

    • JMulTi “is an interactive software designed for univariate and multivariate time series analysis. It has a Java graphical user interface that uses an external engine for statistical computations.” (License: GPL) (The only external engine support I know of is GAUSS, but presumably this could be adapted to e.g. NumPy.)
    • R is a free and open source clone of S-PLUS. (R is sometimes called ‘GNU S’.) The original S developers contribute to R, and it is said that much of S+ has been ported at this point. The site includes manuals, an archive of contributed code, links to R mailing lists, and the R mailing list archives. Mac users should be sure to visit the R for Mac OS X Developers page, where they will also find a useful gfortran. You can call R from other languages, including Python. Do not overlook Tinn-R, a nice replacement for the basic code editor provided by Rgui. (License: GPL) (See the R hints.)
    • gretl is the Gnu Regression, Econometrics and Time-series Library, a free, open source regression package. This is a very user friendly yet powerful package suitable for a large range of time-series econometrics. Note that gretl uses Gnuplot for its graphics and provides substantial script access to it, so that graphics are fast and powerful. See the
    • Gnu PSPP (formerly Fiasco) is a FOSS clone (roughly) of SPSS. It interprets commands in the SPSS language and produces tabular output in ASCII, HTML, or PostScript format. PSPP already supports a substantial subset of SPSS’s transformation language. Its statistical procedure support is growing.
    • Another useful resource is the scientific software list on the Scientific Web
    • Here is a different approach for Mathematica users: mathStatica is a high precision math/stat package that uses Mathematica as its computational engine.
    • Be sure to visit Carnegie-Mellon’s Stat Lib Server Stat Lab The Applied Statistics algorithms may be of special interest.
    • Time Series Protocol for Application Database Interface
    • OK, OK, Gambit is not statistical software, but I’ve got to put this fine, scriptable collection of game-theory tools somewhere!

    Optimization

    Resources in this area are extensive. I will only mention a few idiosyncratically selected items. (For linear and non-linear programming, see also the separate list of solvers.) Do not forget to think about scaling issues. (Here is one discussion of scaling: Optimization with the Quasi-Newton Method.)

    Python Specific

    • SciPy includes the scipy.optimize module. (Along with many other unidimensional and multi-dimensional optimization functions, this module includes fmin_l_bfgs_b for constrained optimization, which takes an optional bounds argument that is a list of min/max values for each parameter.) Since the code is free and open source, you can adapt these to the language of your choice.
    • Dahl and Vandenberghe’s CVXOPT (convex optimization) code, which includes Python classes for storing and manipulating dense and sparse matrices.

    Other

    For difficult global optimization problems, look into Swarm Optimization, surveyed by Ab Wahab et al (2015).

    Visualizing Data

    Data analysis almost always involves data visualization. Classic texts include: The Visual Display of Quantitative Information by Edward Tufte and Visualizing Data by William S. Cleveland. You can get the data and S scripts for Cleveland’s book. Cleveland (with Becker and Shyu) developed Trellis Graphics™ for data visualization, which has been implemented for a number of platforms including Gnu R and Python (e.g., via Plotly. (The name is trade-marked, so these are often referred to as lattice plots.)
    Other resources: Daniel Carr’s page.

    For interactive data visualizations, must consider Vega and Vega-Lite. These visualization tools implement a grammar of graphics and a grammar of interactivity, mostly using declarative specifications in JSON. Vega-Lite provides a convenient, very high level access to this grammar. Many languages now support this, including JavaScript, Python (Altair), Julia (VegaLite.jl), and Haskell (hvega). Voyager 2 is an interactive data exploration tool built on top of Vega. Some languages support this, including JavaScript, Python (Altair), Julia (DataVoyager.jl).

    Modrian “is a statistical data-visualization system written in JAVA.” Good for categorical data and for maps. Plots are interactive. There is a supporting paper by Martin Theus.

    Symbolic Mathematics/Computer Algebra Systems

    Find a more list of Computer Algebra Systems (CASs) on Wikipedia. This section mentions only a few particularly interesting options. For most users, commercial CASs remain the right choice, but some interesting FOSS solutions exist.

    Open Source CASs

    • Mathics implements a very useful subset of the Wolfram Language, which is the language of Mathematica.
    • Sage (License: GPL) is an extensive, Python-based CAS with excellent documentation. There is a simple tutorial. Sage provides interfaces to many other specialized programs, including Maxima for symbolic calculus.
    • Maxima (License: GPL; Language: Lisp) is is a free cross-platform solution. (A windows binary is available.) It is distributed with a notebook interface: wxMaxima (License: GPL2). (Applications for economists, with a supporting text, can be found at http://www.wxmaximaecon.com/.) The notebook can be used to produce beautiful PDF documents via LaTeX; see Typesetting in wxMaxima for details.
    • SymPy (License: new BSD) is a Python-based CAS that very easily extensible. It is included with Sage.
    • Axiom (once known as ScratchPad) is free and open source. “Axiom … defines a strongly typed, mathematically correct type hierarchy. It has a programming language and a built-in compiler.”
    • GiNaC offers an interesting and extensible option for those willing to deal with C++. Swiginac is a Python interface to GiNaC.
    • Singular is “a Computer Algebra System for polynomial computations with special emphasis on the needs of commutative algebra, algebraic geometry, and singularity theory.” It is GPL software. (A windows binary is available. This requires the Cygwin binary, but it also installs it.) Also see Bergman, “a system for computations in commutative and purely non-commutative graded algebra.”
    • Groups, Algorithms, Programming (GAP) “is a system for computational discrete algebra, with particular emphasis on Computational Group Theory.” (License: GPL2)

    Commercial CASs

    Mathematica (Wolfram Language)

    Mathematica justifiably remains the most popular symbolic math program. Mathematica is also a bit expensive, although Mathematica for Students is available for full-time students at a big discount.

    Mathematica is excellent for both teaching and research. It has an unfortunate weakness in document production, where it lacks easy and intuition solutions for many facilities needed for professional books and journal articles. (Noteworthy missing features are footnotes, floating tables and figures, and bibliograph management.) Nevertheless, many researchers use it directly for report and document production.

    Interesting Mathematica Books for Economists:
    Introductory Mathematica books:

    Other Commercial CASs

    Web Resources

    Math on the Web

    There are a number of way to provide access to nicely formatted math on the Web. The most widely used is to provide PDF documents that contain nicely formatted math. The best way to produce good looking math in PDF documents is with TeX based software. Acceptable results can sometimes be achieved by converting a word processor document with equation editor objects embedded in it.

    The other major alternative is to somehow produce math in a web page. The stand for this is MathML, but as late as 2021, FireFox and Opera remain the only major browsers with good support. (Be sure to download the STIX fonts.) Producing MathML by hand is impractical, so there has been a search for feasible ways to rely on MathML. One of the most interesting approaches is to use reStructuredText with the rst2html5 writer. This approach uses LaTeX syntax to input mathematics. Possible output formats include MathML and MathJax. This is probably the simplest powerful way to put math on the web.
    Another interesting approache is ASCIIMathML, which simply includes LaTeX-like math in a normal HTML file. (A clever javascript renders the math.) Mozilla based browsers such as FireFox have excellent native MathML support, so they work well with ASCIIMathML. (But you need to install the math fonts. See the Wikipedia MathML article for a summary of support by other browsers.

    One other alternative is to convert LaTeX documents directly to XHTML+MathML documents. This can be done with LaTeXML, TeX4ht, or with the closely related TeX4moz. TtM looks like a similar effort.

    Browsers

    If you want to test your browser for standards compliance, start with the Acid 3 tests. You might also want to look at handling of MathMl, SVG graphics, or even a very simple XHTML. (Be sure to look at the tests where the document is served as XML.)

    Ebooks

    The ePub3 standard introduced MathML support. Quite a few ePub readers support MathJax.

    Email

    Request:
    Please follow basic email etiquette [1|2], by quoting selectively and only as necessary to provide context for your reply. When appropriate use only ASCII text for your email. Finally, if you must use Outlook, do your interlocutors the courtesy of turning off TNEF attachments!

    Get a decent email client. Since there are so many good options, choose an email client that has a multi-platform presence and, most importantly, lets you use your own editor.

    Suggestion:
    Using your own editor will repay you handsomely, saving time and frustration. Here are examples of things any good editor will allow you to do simply. Preprocess your email to compensate for bad practices by the sender, delete or reformat blocks of text (e.g., a line, a sentence, or a paragraph) without reaching for a mouse, adjust capitalization (e.g., change caps to lower case or vice versa, or convert to first letter caps), and quickly insert text from any other file (i.e., read it in, so you do not need to cut and paste). One could propose that every application in which you need to edit text should include such facilities. E.g., there are many email clients with built in editors that have many such facilities. But then each time you change applications you will have to learn a new editing environment. Instead, whenver possible, you should use applications that provide support for an external text editor. By sticking with your preferred editor you do not have to learn a new editing environment and scripting language each time you switch applications. That of course is the point of modularity.

    See Wikipedia’s list of email clients for a sense of what’s out there. I like the free, cross-platform PINE, which is keyboard oriented, highly configurable, and has a good Windows version. But (despite occasional instability on Windows) I generally use Thunderbird. Another email client that is now cross-platform is Claws Mail. Big plus: unlike most Windows email clients, Thunderbird, Alpine (formerly pc-pine), and Sylpheed let you use your favorite editor to edit your email. Thunderbird supports external editors by means of a plug-in.

    See the Thunderbird hints and Alpine hints below.

    Another cross platform solution is now The Mutt Email Client—long popular among Unix users, and available to Windows users. (You can also get mutt along with fetchmail, and sSMTP in a unix-mail package for Windows, but you’ll have to install Perl and Cygwin.) Another popular cross-platform email client is Mulberry, and it is available on many platforms. (License: Apache 2.0)

    Document Formats

    What are some good document formats, and how can one transform between them?

    For writing math, nothing beats LaTeX. However, you can use reStructuredText with writers that support math to produce both LaTeX and XHTML MathML.

    HTML

    Writing HTML is easy. Conversion to other formats is possible. For example, ost word processors will read HTML and automatically convert to their own format. You can also convert HTML to PostScript (if you have access to Perl).

    After learning a few HTML basics, you can learn much more from the materials at the World Wide Web Consortium W3C). Most of the time you should be able to use XHTML Basic and Cascading Style Sheets (CSS). Here is some CSS Background, and the wonderful chapter 1 of Cascading Style Sheets 2.0 Programmer’s Reference by Eric A. Meyer. For more information and links, go to the HyperText Markup Language (HTML) Homepage. Some authors may like to see the ISO standard as well.

    All modern Word Processors can export their documents as HTML: unfortunately, they often produce pretty bad HTML. You can get much better results with some of the HTML editors, such as the web development suite offered free by Evrsoft

    XHTML

    XHTML is a wonderful HTML related markup which provides for most needs when used with CSS. Unfortunately some browsers do not support it, unless you serve it as HTML. (That is the trick used in the present document.) Some authors discourage this practice, but it should work fine, as long as you validate your documents.

    XHTML: Introduction to XHTML, with eXamples” helpful | XHTML validation. With XML/XHTML (handled by an XML processor) you will be able to define your own entities in the doctype declaration. E.g., you could define <!ENTITY alpha “&#xxxx;” > (where xxxx = the numeric reference) to get around remembering numeric references. The XHTML+MathML document type looks particularly useful, and it is already used to provide math support in reStructuredText.

    Mathematical Markup Language (MathML) is now a wonderful reality. FireFox and other Mozilla based browsers offer native support. So does E-Lite: ICESoft’s lightweight Java web browser offers full, native MathML implementation. Internet Explorer browsers currently support it only via plug-ins. Public discussion on features for math in HTML contexts takes place on www-math@w3.org. To subscribe send a message to www-math-request@w3.org with “subscribe” as the content of the subject. There is a public archive. Also, consider WebEQ for Web math.

    XML: Perhaps the most interesting current XML development for non-programmers is OpenDocument Format (ODF). The is a promising open document exchange standard. The OpenDocument Format is an open, fully-documented, royalty-free standard for document exchange. It is supported by OpenOffice and the closely related LibreOffice. There is also a plug-in converter for MS Word (TM).
    By the way, docutils can write directly to ODF: see Dave Kuhlman’s work (currently in the docutils sandbox).

    Transport Neutral Encoding Format (TNEF)

    What is that winmail.dat attachment you just got in your email? It is a proprietary Microsoft format that bundles together multiple attachments in a way that most email clients cannot unbundle. How obnoxious! So, what can you do about it?

    One possibility: ask your interlocutor for the simple courtesy of turning off TNEF attachments! (Instructions are the bottom of the article.)

    If you are unfortunate enough to receive a TNEF attachment from someone who cannot figure out how to configure their email client to send attachments that everyone can read, you may have to unpack the TNEF attachment yourself. The only cross platform solutions I know of are JTNEF and pytnef (License: LGPL). At this point, pytnef relies on the tnef command-line utility that is I think only available for unices (although it looks like it could be compiled for Windows).

    Email Scripts

    If you need to produce email in a scripting environment, Python offers all the basics in the smtplib module. You can even add MIME attachments with reasonable ease.

    News Readers

    Cross platform: Pan (GPL) or slrn or Gnus.

    Free for Windows: Xnews and Forté Free Agent.

    Email

    TO AVOID SENDING AND RECEIVING VIRUSES:
    SENDING
    i. use plain text to send and receive information whenever possible. All word processors and spread sheets can save as .txt. There is seldom a real need for using anything except plain text for email.
    ii. When plain text is not possible (because special formatting is required) you can almost always use HTML. All modern word processors and spread sheets can save as HTML. This is almost risk free, but to be really safe you can turn off Java and JavaScript in your browser preferences.
    iii. When page formatting is crucial, which it almost never is, use Adobe’s PDF format. You may need a PDF “printer driver” to do this (such as Adobe Acrobat, Jaws, or some free alternatives such as PDFCreator).
    RECEIVING:
    i. Many viruses are received as part of email attachments. Other malware (known as worms) will email themselves from an infected computer to many others. So the best practice would be to not open any email attachments. Unforunately, sometimes we need to open attachments. ii. If you must open an attachment, view the file extension. The default in Windows is to turn off your ability to do this, which means you can be tricked into thinking a dangerous Visual Basic script filename.jpg.vbs is really a safe .jpg file. You can fix by following this windows hint. For Windows users, especially dangerous extensions are .exe, .com, .pif, .vbs. Also dangerous are .doc and .xls. (Comment: dangerous file types can be included as “attachments’’ to .pdf files as well, which means you should not open such attachments with Adobe Acrobat either.)
    iii. When possible, avoid the use of susceptible proprietary file formats (such as Word or Excel). Related to this, avoid the use of Outlook unless you know how to turn off all its dangerous features. And if you simply must open a document in a MS format (e.g., because that’s what a work colleague sent you), learn how to turn off the availability of macros. You should also be cautious with any other format that supports macros, which basically means you should avoid exchanging information in word processor formats (see i. and ii. above).
    iii. Never run a program file unless you know it came from an impeccable source. (For Windows users, this includes file extenstions .exe, .com, .pif, .bat, and .vbs.)
    iv. Windows users should disable autoplay, since it allows arbitary executable to run automatically on your computer.

    Additional Comment: Many new viruses are not detected by anti-virus software. Safe practices are necessary. Furthermore, if the recipient wishes to read what you send in their word processor, all modern word processors also import plain text (safe), HTML (safe if no JavaScript), and PDF (usually safe if no JavaScript) very simply.

    Multimedia Resources

    Since this is not a core interest of mine, I list only a couple resources.

    • The cross-platform PyMedia Python module provides an interface for the digital media manipulation (wav, mp3, ogg, avi, divx, dvd, cdda, etc). It includes parsing, demutiplexing, multiplexing, coding and decoding.
    • VideoLAN provides “a highly portable multimedia player for various audio and video formats”. (License: GPL) VLC is an amazing multiplatform, FOSS resource. (Includes an installer for Windows users.) If you need additional capabilities, you can try DivX.
    • Miro (License: GPL. Formerly known as Democracy Player).

    Attention Vista users: your operating system came without the Windows Media Player plugin. Fortunately, mozillaZine explains how to install the WMP plugin.

    Programming

    Modeling Languages and Solvers

    Modeling Languages

    The modeling languages most widely used by economists are commercial: GAMS (with online documenation) and GEMPACK (with online documentation). Economists use these primarily for CGE modeling. (See these helpful CGE exercises with solutions.) Mathematica supports Modelica, an entity (object) oriented modeling language that may prove useful to economists.

    Other alternatives are listed at http://plato.la.asu.edu/topics/tools.html. A few are listed below.

    • ASCEND is an object-oriented mathematical modeling environment and a strongly typed mathematical modeling language. (License: GPL.)
    • PuLP “is an LP modeler written in Python. PuLP can generate .LP and .MPS files and call GLPK, COIN CLP/SBB, CPLEX or XPRESS to solve linear problems.”
    • LPFML is a W3C Schema for representing linear-programming problem instances in XML. See also the open source C++ classes to facilitate the exchange of information between modeling languages and solvers. (Includes classes that allow many solvers to “read and solve problems in XML format and output the solution results in XML format.” Also includes an application “to create a model with the AMPL modeling language and write the instance data in LPFML format for solver solution.”)
    • ProLog and Modelling (PLAM) “is an implementation in Prolog of an algebraic modelling language.” Can generate the solver independent MPS-format; works with a variety of solvers. Needs Prolog; works with Using the free and open source SWI-Prolog (linked from the webpage). together with lp_solve gives you a free modelling environment. Add the free and open source lp_solve to get a free modeling environment. For stochastic programming problems, add stochplam.
    • AMPL
    • AIMMS. “contains a modeling language that allows you to model linear programming models and it links to most available commercial solvers. It also contains an intergrated development environment with possibilities to build a graphical user interface via point-and-click.”
    • MODLER with ANALYZE and RANDMOD.
    • ZIMPL translates linear or (mixed-) integer models into the .lp or .mps file format (accepted by many solvers).

    Solvers

    Naturally, many commercial modeling languages come with a variety of solvers. Here are some other solvers.

    • GNU Linear Programming Kit (GLPK) “supports the GNU MathProg language, which is a subset of the AMPL language.” (Includes a translator for GNU MathProg and documentation.)
    • SeDuMi “is a software package to solve optimization problems over symmetric cones. This includes linear, quadratic, second order conic and semidefinite optimization, and any combination of these.” License: GPL.
    • COBYLA is “a derivative free non-linear optimizer that can deal with non-linear constraints.” (Provides a a Python interface.)
    • COIN-OR provides a variety of open source solvers.
    • Soplex is a simplex solver that is free for academic use.
    • You can use the solvers on the NEOS server for free. They offer an API to communicate with their XML-RPC server, so you use NEOS from within your program. (They offer a sample client written in Python.)
    • PENNON from PENOPT.
    • SUNDIALS is a useful suite of solvers, written in C. Also of interest: The Trilinos Project strives to provide parallel solver algorithms in C++, and it provides a Python interface to these.
    • SFE is a finite element solver.

    TypeScript

    TypeScript is essentially ECMAScript with type specifications.

    JavaScript/ECMAScript/ES

    ECMAScript is a standaradization of JavaScript, a dynamic, interpreted programming language whose origins are in client-side scripting in the browser. Most browsers support ECMAScript, and client-side scripting has been used to create economic applications. [#paine.stark-2004-cheer] These features made it a widely used language. Growth in language features, including support for functional programming, have made it a rather interesting language as well.

    Java

    Java is a strongly-typed object-oriented language. If you want to program in Java, consider the Eclipse IDE. The JSwat debugger front end may also prove useful. If your application is mathematical you may be interested in the Java Mathematical Expression Parser (JEP). Other Java related resources can be found at

    Python is an obvious choice for server side scripting. You might consider Xitami as a cross platform server solution, or simply to test your scripts.

    Cross Platform GUI

    The obvious language independent FOSS choices currently (2005) seem to be TK and wxWindows, with TK being simpler, more mature, and a bit slower and wxWindows being faster and more powerful but less stable. Of course Java provides a language dependent solution.

    Tkinter

    Python comes with the Tkinter module, which provides a Python interface to the TK graphical user interface (GUI). Tkinter documentation is spread around. For a very brief introduction, you can try Alan Gauld’s tutorial. If you use Tkinter, consider using Python megawidgits (Pmw). (You can also easily add graphing extensions with BLT Toolkit. You may want to also get Mark Rivers’s enhancements.

    tk_happy allows very fast, menu guided tkinter GUI creation.

    Curses

    Until recently curses has been unavailable for Windows. Wcurses is a curses module for Python that works under Windows. There may also be some profit in considering curses applications on INTERIX.

    wxWindows

    wxWidgets offers cross-platform API (C++ library) for writing GUI applications. wxPython is a Python extension module that wraps wxWidgets. Dabo is a cross-platform application development framework, written in Python atop the wxPython GUI toolkit. (Dabo capabilities resemble Visual Basic or Visual FoxPro, but it’s cross platform.)

    Graphics

    Graphics Formats

    There is some useful background on the PyMol wiki.

    Encapsulated PostScript (EPS)

    Encapsulated PostScript (EPS) remains a very important standard for graphics inclusion in journals and books. It therefore pays to learn a drawing application or language that allows you to generate encapsulated PostScript (EPS).
    You can convert EPS to PNG or SVG. (See below.)

    PostScript to PDF Conversion
  • GhostScript and GhostView let you view and print PostScript files. GhostScript includes ps2pdf, for generating .pdf files. Be sure to see the relevant FAQ and a useful discussion. (To convert an entire direction at the Windows command line, you can use: for %i in (*.eps) do epstopdf --gsopt=-dPDFSETTINGS=/prepress %i. Windows users may be interested in the small, fast RoPS interpreter, which has a free Language Level 1 version. (RoPS source code appears to be available.) Serious PostScript programmers may profit from PSAlter’s helpful debugging facilities.
  • Portable Document Format

    In many applications, EPS) is being replaced by Adobe’s Portable Document Format (PDF). PDF) and page indepdence and support for new features, but loses the powerful PostScript drawing language.

    Portable Network Graphics (PNG)

    Currently the best choice for web graphics. (GIF and JPEG suffer patent problems, although these patents are finally expiring.) Before placing graphics on the Web, visit the Portable Network Graphics (PNG) homesite.

    MNG and APNG
    The animated version of PNG is called MNG, for Multiple-image Network Graphics. It supports looping (including nested loops), clipping, deltas, and other features, plus everything PNG supports– including alpha transparency. Unfortunately implementations have been lagging. However FireFox supports the animated PNG (APNG) format, which is less complete but quite capable.

    Drawing Languages and Metalanguages

    With all the point and click drawing applications currently available, why bother with a drawing language? The answers are generally precision, speed, and fun, often in that order. This section concentrates on 2-D drawing, with emphasis on the PostScript drawing language, while mentioning a few other interesting possibilities.

    The so-called Grammar of Graphics has garnered attention because of its power and expressiveness. PlotNine is an implementation for Python. ggplot2 is an implementation for R. It is supported by two popular books: R Graphics Cookbook and ggplot2: Elegant Graphics for Data Analysis.

    PostScript

    PostScript is a device independent page description language. If you want to precisely render a vector graphic, you may well find it convenient to draw it yourself in PostScript. I offer an introduction to PostScript Drawing for the Sciences. (Still under revision; comments welcome!) See some PostScript hints below.

    Many people prefer to use a meta-language to produce their PostScript graphics. Most of these can also produce PDF. Some produce other formats as well.

    GhostScript and GhostView let you view and print PostScript files.
    Related: PLisp takes the basic structure of Common Lisp and uses it as an alternative representation of a PostScript program. While the basic graphic operators of PostScript are retained, Lisp-like function definition, control flow, and variable binding become available. Macros, defined constants, and function libraries have also been provided. The PLisp compiler generates PostScript code which is guaranteed not to contain errors in stack usage.

    Scalable Vector Graphics

    SVG
    This popular format for web graphics can be useful when you need vector graphics and/or animation. It was supposed to be possible to embed SVG in PDF, and for a while Adboe worked actively on an SVG viewer (which is still available). This seems to have stalled, and indeed further development of the SVG standard unfortunately seems to have stalled. For extensive SVG manipulation and generation tools, see Batik (language: Java). An increasing number of graphics languages offer an SVG backend.

    Scalable Vector Graphics is a royalty free vector graphics standard for the Web, and it is a powerful animation format. (If you have simple, static graphics to produce, you might write them in PostScript and then translate using pstoedit.)
    One of many nice things about SVG is that it can be embedded into PDF, animations and all! (See this very cool example.) Here is a perl script. Here is a Java converter. Here is a Python script. (If you can find Leonard Rosenthol’s Acrobat plug-in, let me know. It seems to have disappeared.)


    Another nice thing is that you can move image generation to the client side.

    Browser support for SVG is improving but advanced features may be missing. Check your target browser. (You may find some useful information on Wikipedia.)

    Curren Kelleher offers an extensive tutorial on data visualization using SVG (via D3). The tutorial uses VizHub (MIT license).

    3D Drawing

    3D drawing: For simplicity and power, it will be hard to beat Sketch. (Langauge: C++ (binaries available); License GPL) Particularly helpful to LaTeX users is its support of tikz. (See Kjell Magne Fauske’s nice introduction to Sketch, which includes full examples.)

    Try the Persistence of Vision Ray Tracer (POV-Ray). If you need high performance real-time 3D, consider Irrlicht. If you are an OpenGL user, superficie may be useful, although development appears quiescent. (License: GPL)

    3D Plotting

    3D plotting: For nice, accurate surface plots, there is probably no simpler solution than Gnuplot. The SymPy plotting module is very interesting. QwtPlot3D appears very powerful, and PyQwt3D provides bindings for Python users who wish to produce scientific 3D plots. (Now supports NumPy arrays.). Other possibilities include Visual Python and Python Computer Graphics Kit. Also, OpenDX looks like a very powerful open source implementation of the IBM Data Explorer (DX), and there is also a Python binding. VisIt looks to be an extremely powerful way to produce 3D animations.

    The Visualization Toolkit (VTK) “software system for 3D computer graphics, image processing, and visualization” consisting of “a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python.” (License: BSD-like, but containing some patented technology.)
    Hint: Find yourself a good interface to VTK. VTK provides wrappers for Python, Tcl, and Java, but the wrappers resemble VTK more than the supported language. Python users may like MayaVi, but this still requires VTK knowledge. For true ease of use, consider Enthought’s mlab Python framework for access and manipulation of MayaVi2 objects. (Also note that PyVTK can write VTK files from NumPy data.) TVTK provides a powerful and “Pythonic” interface to the Visualization Toolkit. With some feature resemblance to MayaVi, the possibly more powerful Paraview is written in Tcl/Tk rather than Python.

    More 3D plotting solutions:

    • PLplot is a powerful plotting library, which includes bindings for a variety of languages. This library has an excellent reputation. (Language: C, with many bindings including Python; License: LGPL)
    • Blender allows Python scripted 3D animation.
    • mat3d is an OpenGL 3D-plotting solution under Python.

    HippoDraw produces interactive graphics for data analysis. Hippodraw includes Python bindings and a Python extension module.

    Rendering Engines

    • Anti-Grain Geometry (Language: C++; License: GPL 2+)
    • OGRE is a popular 3D rendering engine. (Language: C++; License: MIT)

    Animation

    Simon Yuill offers a nice animation tutorial (with a Python emphasis).

    Pms.Blt provides a Python interface to the BLT Graph plotting library.

    • Unx and Windows users can convert collections of PNG files into motion video using MPlayer. You can compile this yourself or find prebuilt packages. (A tutorial is available. To produce a .avi file, try something like mencoder mf://.png -mf type=png:w=600:h=500:fps=10 -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi or like this mencoder ’mf://*.png’ -mf type=png:fps=12 -ovc lavc -lavcopts vcodec=mpeg4 -o animation.avi .) If you have mpeg2encode, this can also be done with ImageMagick, try convert -delay 20 c:/myimages/img*.png c:/myvideo/imgs.mpg.
    • FFMPEG can “record, convert and stream audio and video”. (License: LGPL; Language: C) (See the user hints.) Windows users can install with winget: winget install "FFmpeg (Essentials Build)".
    • You can create animated .gif files with UnFREEz by WhitSoft Development.
    • You can create PDF files containing animations with LaTeX’s PDFAnim package. Support for storing the entire animation as a mutlipage encapsulated PDF would be a nice feature, if someone has the energy to implement this!
    • You can include MPEG or AVI movies in PDF using pdf(La)Tex and for example the movie15 package. (This is on platforms where Adobe Reader supports this, including Windows and Mac.) Jens Nöckel offers a simple tutorial.
    • The MNG, SVG, and GIF formats also support animation.

    Blender supports powerful 3D drawing and animation, which can be assisted by Python scripts.

    HarddiskOgg can record analog audio “directly to Ogg Vorbis/MP3/Wave with on-the-fly normalization”. (License: GPL)

    HTML % includes a VIDEO element, supported by FireFox 3.5+ and Chrome 3.0+. (See Video For Everybody for usage hints.) This enables native OGG/Theora video playback in Firefox 3.5! For conversion of video formats, you might try HandBrake. (License: GPL)

    Plotting in Python

    See the SciPy Topical Software Wiki for an extensive list of options.

    2D Graphics

    • For publication quality 2d graphics, I like Matplotlib. (It also supports 3d graphics, but I have not used this functionality.) This is truly amazing free and open source graphics software. Its pyplot module provides quick-and-easy MATLAB-like graphing functionality. For finer grained control, you may prefer Matplotlib’s object-oriented API. Matplotlib can save to a variety of formats, including SVG (which you can then manipulate with Inkscape). See the Matplotlib hints below.
    • QtiPlot is fully Python scriptable. (License: GPL)
    • It is possible to control gnuplot from Python with PyGnuplot.
    • Spectronon is for analyzing hyperspectral data (images with many more bands of color than the traditional 3: red, green, blue). It can also be useful for more traditional image processing. Written in python and utilizes Matplotlib, NumPy, PIL, and scipy. Includes a fairly simple plug-in architecture for extending some of Spectronon’s behavior.
    • WxPyPlot is fast and lightweight.
    • Biggles is a slick and simple Python module for 2-D plots.
    • Vision (formerly ViPEr) is a visual programming environment for graphics manipulation in Python, which provides many transformation and visualization tools.

    3D Graphics

    Network Graphics

    • graph-tool is a very fast Python module (based on a C++ library). (License: GPL)
    • NetworkX

    Animation

    • You can use Matplotlib to make “movies”. Here’s how. (Requires Python Imaging Library and ffmpeg.)
    • If you just need to display animation in real time, you may be satisfied by scripting a sequence of gnuplot figures with short pauses between them. You can use Gnuplot.py.

    Graphics Format Conversion

    Convert to EPS

    A cross-platform standard for graphics is Encapsulated PostScript (EPS). EPS is sometimes the expected graphics format by publishers when you submit drawings for a book or journal article, although PDF is becoming more universal. A common file conversion problem remains taking a file produced in a different format and converting it to EPS.

    • CairoSVG converts SVG to PostScript and PNG.
    • bmpp converts bitmap formats (e.g., PNG, JPEG, or TIFF) to EPS or PDF. (It supercedes bmeps.)
    • epspdf can “round trip” between EPS and PDF.
    • The Pillow imaging library offers many format conversion. (Language: Python; License: roughly MIT)
    • ImageMagick supports conversion from virtually any format to EPS (or any other format). (Binaries for many platforms, including Windows, can be found by following the appropriate links from the home page.) (GPL compatible license.)
    • AutoTrace converts bitmaps to vector graphics. (GPL)
    • There are a number of good options for converting JPEG files to EPS. Note that PostScript (level 2+) supports JPEG, so this is largely a matter of adding an appropriate wrapper. My favorite approach is to use the ability of PyX to insert JPEG images into EPS and PDF files. A more popular approach is to use PDFlib’s very fast jpeg2ps converter. (Language: C) This wraps the JPEG file formats in a PostScript wrapper, without uncompressing the images. (PostScript Level 2 and Level 3 interpreters support decompression of JPEG file formats (JFIF but not JPEG2000).) There is a Windows version. Lee Sau Dan provides a perl script that does much the same thing. (Licence: GPL2) An interesting approach is jpeg2eps, which is written in PostScript (and therefore requires an interpreter, such as GhostSript, to run); it wraps JPEG files so that an EPS interpreter can handle them. The adventurous can try Don Lancaster’s recipe, which is code to be inserted directly into a PostScript file. (After a few minutes trying, I did not get this to work, but Lancaster is brilliant so it should. Note that your Distiller may have disabled file reading and writing by default; you will need to fix this.)
    • Mayura Draw is a shareware vector drawing program for Windows that can read in WMF files and export EPS, although this currently has a few bugs.
    • If you have an X-server, you can use the xv image manipulation program.

    Convert to PNG

    PNG is the current standard for web images. If you have produced an image for the web in a different format, see the LibPNG list of converters. There are many options listed there, but if your image is PostScript or PDF, consider GhostScript.

    Convert to PDF

    GhostScript can convert many file formats, including PS to PDF. You can combine GhostScript with the Redirection Port Monitor (RedMon) to produce PDF files (see helpful directions). FreeDist is a Visual Basic program can automate this process for Windows users. FreePDF seems to offer similar functionality to FreeDist. PDF995 is another free (gratis) but not open source alternative.

    If you need to convert entire HTML documents to PDF, the easiest way to is to open it in a browser that supports conversion and simply save as PDF. (Chrome supports this as a Print destination.) There are also stand-alone converters. Try HTMLDOC. Perl users can try html2ps and then use GhostScript. If your document is well formed XML, CSSToXSLFO offers very interesting possibility. It converts an XML document, together with a CSS2 style sheet, into an XSL-FO document. The document “can then be converted into PDF, PostScript, etc. with an XSL-FO-processor”, which is included. (License: Public Domain)

    • Windows users can use PDFCreator. (GPL)
    • Jaws: Use Jaws PDF Creator is a printer driver you can use to create PDF files. Educational pricing available.
    • Adobe Acrobat:
      For best results, follow these steps.
      1. Install the AdobePS Distiller as your PostScript printer. (You’ll find the installation program on your Adobe Acrobat CD under drivers/Win95/adobeps4/setup.exe.) 2. In the printer properties, under the Fonts tab, have the fonts sent as Type 42. 3. Start up the Acrobat Distiller. Under the Font Embedding tab of the Distiller job options, choose Embed All Fonts. 4. Print your .dvi file to file using the AdobePS Distiller as your printer. This produces a postscript file with a .prn extension. If you have version 4 if also produces your .pdf file automatically (unless you turned this off.) If you have version 3, there is one more step: 5. Run the Distiller on your .prn file to produce the viewable .pdf file.

    Abiword allows you to convert/print from the command line. It reads ODF and RTF (which can be produced by Word).
    unoconv is a Python script that uses the uno/pyuno access to the OpenOffice API. You my need to start an instance of oowriter: problems were reported with the –listener option as late as 2009.

    Other Graphics Format Conversions

    • pstoedit translated PostScript and PDF graphics into other vector formats, including (on Windows platforms) WMF. It is included on the GhostView menu Edit/Convert to Vector Format.
    • ImageMagick is a set of free graphics utilities that can convert from virtually any format to any other format. (Binaries for the Windows platform can be found by following the appropriate links from the home page.) Support for some of the formats are delegated to libraries or external programs. For example, ImageMagick requires GhostScript to read PostScript and PDF files.
    • GhostScript can convert many file formats.
    • IRFAN View is a freeware (for noncommercial use) graphics viewer that supports many graphics conversions, including PNG graphics. IrfanView is usable both as a GUI and from the command line. (It supports batch operations.) It supports many different file type conversions, but does not yet convert to EPS.

    Drawing Applications

    There is an almost limitless variety of high quality commercial drawing applications with pricing roughly linked to functionality. Rather than attempt to list or compare those, I will focus on a few cross-platform alternatives.

    Metalanguages for PostScript

    Python users have a number of fine alternatives. For serious 2-D drawing, I like PyX very much. PyX also has some support for 3D graphics. (See my PyX hints below.)

    While PyX is great for data-based graphs, I often find myself using Matplotlib for these. (Matplotlib is a wonderful 2-D plotting package which also supports powerful interactive graphics.) PyX and Matplotlib support the generation of EPS and PDF plots with LaTeX text. (Additionally, Matplotlib provides an impressive mathtext capability independent of LaTeX.)

    Matplotlib and Pyx currently take different approaches to math text. PyX uses LaTeX to typeset the math, so you must have a working LaTeX installation. Pyx generates PostScript, PDF, and SVG graphics with this approach. Matplotlib uses its own parser and layout engine to typeset math text with Type 1 computer modern fonts. You do not get the full power of TeX typesetting, but you can produce outputs in a variety of formats (including EPS, PNG, and PGF). Here are some details.

    Matplotlib supports spark graphs (sparklines) via the sparkplot module. (Sparklines can also be produced with PIL using the Sparkline Generator Web Application.)

    Other possibilities:
    Asymptote is a powerful and popular language for drawing 2D and 3D graphs. The syntax resembles Metapost. Support LaTeX typesetting of labels. Asymptote allows easy generation of animations (animated GIFs and MPEGs)! (License: GPL 3.0)
    Kiva “is a multi-platform Display PDF 2D drawing engine that supports multiple output backends, including wxWidgets on Windows, GTK, and Carbon, a variety of raster image formats, PDF, and Postscript.” (Requires ReportLab for PDF output.)
    PyChart is excellent for quick, simple, flexible charts.
    DISLIN is free for non-commercial use and is available as Python extensions.
    VUESZ is a PyQT based scientific plotting package.

    • Particularly popular among LaTeX users: MetaPost, PSTricks, and PGF.
    • Jgraph provides a simple metalanguage for high quality PostScript output. Take a look at the Jgraph lecture to see how this works.
    • Plot-2D for Garnet (Common Lisp) is a powerful graphing package that produces PostScript output.
    • For scientific graphics, and interesting PostScript metalanguage is Gri.
    • If you choose a metalanguage without LaTeX support, then you may want to use the PSfrag package to use your LaTeX fonts within your .eps files. Alternatively, some applications allow you to produce EPS files with supporting LaTeX.
    • I find gnuplot to do this very well.
    • The MATLAB m-function laprint.m is a graphical user interface which saves a MATLAB plot in an .eps file with an accompanying tex file. The .eps file contains PSfrag replacements which are matched by the .tex file (so the .tex file inserts corresponding LaTeX code). It requires MATLAB 5.
    • Graphics Layout Engine (GLE) allows output as EPS, PS, PDF, JPEG, and PNG. (License: BSD)
    • NCL is the NCAR command language from the National Center for Atmospheric Research. The NCAR has migrated the NCL functionality into Python as the Geosciences Community Analysis Toolkit (GeoCAT), available as a geocat module that relies on the matplotlib plotting library.
    • The PGPLOT Graphics Subroutine Library is a “Fortran- or C-callable, device-independent graphics package for making simple scientific graphs. It is intended for making graphical images of publication quality with minimum effort on the part of the user. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time.” There appears to be some overlap in functionality with the popular GD Graphics C library.

    Eukleides is an amazing Euclidean drawing language that can save your drawings as pstricks or in EPS format. It is designed to be very natural for geometric thinking. (License: GPL)

    Graphviz is an open source package with special abilities in drawing directed (via dot) and undirected (via neato) graphs. The focus is on Graph Visualization. pydot provides a Python interface to dot.
    yED is a “powerful graph editor that is written entirely in the Java programming language. It can be used to quickly and effectively generate drawings and to apply automatic layouts to a range of different diagrams and networks.”

    Artdraw may prove promising: it is a PostScript-like syntax that adds alpha blending.

    If you are considering PostScript graphics on the way to PDF documents, is worth noting that ReportLab allows direct creation of PDF graphics and reports.

    Data and Function Driven Graphics

    Before exploring other possibilities, try gnuplot. It meets most non-interactive data driven or function driven plotting needs. It is free and open source, multiplatform, very fast, and very powerful. (There is a Mac version, and here are some instructions for installing under OSX.) You can download official release. New users may profit from Langlais’s “short course” or the IBM tutorial.
    Features: In addition to plotting 2-D and 3-D graphs of arbitrary functions, gnuplot can also quickly plot large data sets. It has a powerful yet intuitive scripting language. GNUPLOT can provide output in many different formats, including the LaTeX picture environment and EPS. The LaTeX and epslatex output “terminals” allow for math symbols etc. (After LaTeXing the resulting .tex file, the .dvi file can be converted to PostScript using dvips -o. The Ghostview previewer can then be used to convert the PostScript file, fonts and all, to EPS.) All told this is quite a powerful plotting tool with extremely flexible output. New users should read Introduction to GnuPlot, but skip the institution specific material on starting gnuplot and head straight for the “Simple Example”. See the gnuplot hints below.

    Other Options
    • For basic data driven or function driven graphics, it is possible to use a spread sheet.
    • Even modern statistical package has substantial charting abilities.
    • DATAPLOT is a script-oriented public domain data visualization tool offered by the NIST. Many different chart types are built in: see their graphics gallery. Additionally, NIST’s Engineering Statistics Handbook is very useful.
    • For complex data driven graphics, you may want to try plotting in Python. (Suitable for real-time and interactive plots.)
    • Grace is a free, cross-platfrom plotting program that has a GUI orientation and produces output in many formats, including EPS.
    • ploticus produces a variety of graph types in common formats, including EPS. (License: GPL) Be sure to see the draw prefab for handling of ploticus scripts.
    • SciGraphica is good for data analysis and technical graphics. (License: GPL) The interface resembles that of OriginLab’s “Origin”. It supports high-quality 2D, 3D and polar charts. Although development looks to be stalled, it remains a powerful option.
    • Ptplot is a 2D data plotter and histogram tool implemented in Java.
    • CoPlot is a high quality commerical scientific plotting package, implemented in Java.

    One other possibility deserves mention: Google Chart. Chart construction becomes a simple matter of URL construction. IBM offers nice examples of use. Chart construction can be simplified by scripting (e.g., in Python or in Ruby).

    Vector Graphics

    • TpX is small, fast, and powerful. Output formats include EPS, PDF, and TikZ. (LaTeX users will particularly be interested in the TikZ output.) Try it! (License: GPL; Language: Delphi)
    • IPE is a powerful cross-platform graphics editor with strengths related to computational geometry and in LaTeX support. It can save figures as EPS, PDF, or XML, and it supports conversion to many other formats. It can produce multi-page PDF figures that can be imported a page at a time into a LaTeX document (e.g., by using the ‘page’ option of the graphicx package).
    • Inkscape is an open source SVG editor. There are Windows test builds. Can export to EPS and EMF.
    • Skencil is a vector drawing program written almost entirely in Python. The related but apparently more active sk1project offers a serious vector graphic package for Linux users. (License: GPL and LGPL)
    • Mac and iPad users should look at GraphSketcher, the new open source incarnation of the old OmniGraphSketcher.
    • QCad is a FOSS computer aided drafting package that emphasizes ease of use.
    • The Computational Geometry Algorithms Library (CGAL) provides geometric algorithms in a C++ library. (License: LGPL for the core library, but see the licensing details.)
    • JFig (a Java port of Xfig) is a cross platform implementation. There is also the classic Xfig for X Windows. WinFIG for MS Windows can read Xfig files. (License: Shareware)
    • For Windows users, WinPlot and Wingeom are free drawing programs. (License: unknown; not open source.) WinPlot, is a free mathematical package for plotting in two or three dimensions. (There is a tutorial.) For precise geometric drawings there is also Wingeom.
    • Dia is a powerful diagramming software that saves as XML and exports SVG and EPS. There is a Windows installer. (If you are interested in Dia’s UML capabilities, you might also like to look at the UML resources (below).)
    • Sodipodi is a still young but promising open source vector drawing program.
    • IV Tools is very useful in a Unix environment.
    • DraTeX
    • Mayura Draw is a shareware vector drawing program for Windows.
    • OpenFX is an Open Source platform for 3D modeling and rendering.
    • Visit the Geometry Center.

    UML, Flow Charts, Etc.

    Unified Modeling Language (UML) may not be truly unified—it is clumsy at best for functional programming—but it still offers a remarkably useful collection of chart types for modeling and simulation. Here is a tiny selection of available resources, plus a few (somwhat) related flowchart resources. For more options, see Wikipedia’s list.

    Papyrus seems the most complete option. However, it is a complete modeling environment, and it is accordingly heavy weight. The remaining options are primarily for drawing key UML diagrams.

    • PlantUML implements a simple text-based description of key UML diagrams.
    • UMLet (Programming language: Java; license: GPL.) Unfortunately, UMLet 1.4 uses Swing under Java 1.8, which produces tiny fonts on high resolutions screens. However, the online version (UMLetino) works fine.
    • Dia is a light-weight option, which provides some UML support.
    • Umbrello (Language: C++; license: GPL.)
    • pgf-umlcd is a nice TikZ package for simple yet attractive class diagrams. tikz-uml allows much more control and many diagram types, but it is correspondingly more complex.

    Here are a couple older flowchart tools.

    • Graph::Flowchart (langague: perl)
    • flow draws flowcharts based on a simple text description. (License: GPL; Language: C)

    Image Manipulation

    • The GNU Image Manipulation Program (GIMP) is very popular and cross-platform. (License GPL) If you want a GUI-based FOSS image editor, this is almost surely what you want. For most users, it is competitive with Photoshop (TM). GIMP is suitable for photo retouching, image composition and image authoring. It includes animation capabilities (including MNG). It can even be scripted with Python.
    • XV “is an interactive image manipulation program for the X Window System”. It was once very popular; it still has a dedicated core of users.
    • There are a variety of limited but useful online photo editors, many gratis.

    Scripted Image Manipulation with Python

    Sparklines

    A sparkline is a line plot but without axes or coordinates, used to quickly display the “shape” of a data sequence. Often the plot is quite small, intended to provide a compact summary of the data. Edward Tufte offers an online discussion of sparklines, with many nice examples.

    • sparlines.py creates text-based sparkplots using Python.
    • spyklines.py creates sparkline plots using Matplotlib.
    • Sparklines in data: URIs, Joe Gregorio’s discusses implementing sparklines in HTML files as data URIs. (Example code from his blog follows.)
    # written by Joe Gregorio
    import Image, ImageDraw
    import StringIO
    import urllib
    
    def plot_sparkline(results):
       """Returns a sparkline image as a data: URI.
           The source data is a list of values between
           0 and 100. Values greater than 95
           are displayed in red, otherwise they are displayed
           in green"""
       im = Image.new("RGB", (len(results)*2, 15), 'white')
       draw = ImageDraw.Draw(im)
       for (r, i) in zip(results, range(0, len(results)*2, 2)):
           color = (r > 50) and "red" or "gray"
           draw.line((i, im.size[1]-r/10-4, i, (im.size[1]-r/10)), fill=color)
       del draw
    
       f = StringIO.StringIO()
       im.save(f, "PNG")
       return 'data:image/png,' + urllib.quote(f.getvalue())
    
    if __name__ == "__main__":
        import random
        html = """
        &lt;html&gt;
            &lt;body&gt;
                &lt;p&gt;Does my sparkline 
                    &lt;img src="%s"&gt; 
                fit in a nice paragraph of text?
                &lt;/p&gt;
            &lt;/body&gt;
        &lt;/html&gt;"""
        print html % plot_sparkline([random.randint(0, 100) for i in range(30)])

    Graphics for LaTeX

    If you produce documents in LaTeX, you would naturally like the fonts and equations in your graphics to match those in your text. There are a variety of solutions. Nowadays the simplest answer by far is to learn to use TikZ.

    TikZ

    See the TikZ hints.
    If your figures are simple (or if you are patient), use the very powerful TikZ drawing language directly in your LaTeX document. TikZ does not depend on PostScript, you can use it directly with pdflatex. (Conveniently, it is also compatible with the dvips/ps2pdf route.) Sean Farley offers an useful tutorial.
    There are many TikZ libraries available, including pfgplots for drawing plots and tkz-graph for drawing graphs. These can greatly simplify your drawing tasks.
    gnuplot since version 4.4 has a TikZ “terminal”. Very nice!
    TikzEdt (License: GPL3) and KtikZ can nicely help you create tikz figures. (Mykel Kochenderfer has compiled a KtikZ Windows binary.) Related functionality is provided by tikz2pdf. (License: BSD)
    If your figures are complex but drawable by hand, you can create them with the TpX drawing application, which can output tikz code. (You can set the default output format to tikz before you start your drawing, or you can change the format in the picture properties.) Unfortunately, develop on this has stopped.

    For great results even in complex drawings, try the PyX graphics package for Python. This will require an initial investment of experimentation and learning, but the results (as EPS or PDF) are fabulous.

    Users of PostScript and pdflatex face an annoyance: pdflatex does not directly support the inclusion of EPS files. However, according to Kai Stirker, one can include EPS files in pdflatex files as follows.
    • In your header put: \usepackage[pdftex]{graphicx}\usepackage{epstopdf}.
    • Run pdflatex with the --shell-escape command line switch.

    Note that you will need to have installed epstopdf, which you get when you install GhostScript. Then just \includegraphics{filename.eps} as usual to include your EPS graphic, and pdflatex will conver them to pdf format on the fly. (Be sure to return the extension! Otherwise you will get conversion the first time, and use of the old PDF after that.)

    If you want your EPS files to be truly portable, you need to embed the fonts. If you use a drawing application, make sure it is configured to embed the fonts. If you convert your .dvi files to PS, you can tell dvips to embed all fonts with the -Pdownload35 option
    dvips -t letter -Pdownload35 file.dvi -o file.ps
    If you are producing PDF files, you can use pdffonts to check for font embedding. If using ps2pdf you can use the option -dEmbedAllFonts=true. See this document for more discussion.

    Miscellaneous

    Build Systems | Security | Keyboards | Calculators | Remote Access | Personal Information Managers (PIMs) | Address Books | Graphics | Office Suites and Related Software | Text Preprocessors | Software for open research | Kid Stuff

    Build Systems

    • The just command runner will probably meet your needs. Recommended.
    • CMake is the classic and extensive (and correspondingly complicated) build system. (See this CMake presenation.)
    • scons is a popular alternative to CMake. (License: MIT; Language: Python.)

    Security

    Laptop (and cell phone) theft is a constant problem. The Prey Project offers a multiplatform, FOSS theft recovery tool. It uses Google geo location and a web camera if available, and is available for the Android operating system. Here are some other possible steps to take. You can run autossh as a service that creates a link between your home router and laptop. Then whenever your laptop has internet, you can ssh into it from home. You can also install a keylogger and schedule (e.g., with launchd or cron) to say sftp the log every day and then restart the log file. (Personally I would only use open source keyloggers, such as PyKeylogger, but these tend to be less focused on hiding themselves.) Probably better than any of this is vigilant use of a laptop cable lock.

    Open Access

    Planning an open access journal (business models, tips, etc.). Software to create and manage online open access repositories for articles: Eprints (from Southampton University, perl); DSpace (from MIT, java); CDSWare (from CERN, python); FEDORA (from Cornell and U. of Virginia, java). Also: Copernicus is a company specializing in the publication of open access journals.

    Fun, Useful, and Open Hardware

    RaspberryPi has an official documentation website, which includes introductions to programming languages (including Python and Java).

    Keyboards

    Remap the prominent caps-lock key to something useful: 1 | 2

    Personal Information Managers (PIMs)

    Wikipedia maintains a list of personal information managers.

    Calendars

    There are lots of good calendars out there. But if you are “always connected” I have not been able to beat Google Calendar.

    Generally it seems a good idea that your calendar support the iCalendar standard. (This means you can easily move it between applications and across platforms.) It also means you can easily write scripts that interact with your calendar.

    For example, you can use the iCalendar. (License: LGPL; Language: Python.) An alternative is the Python-PDI library for personal data interchange, which also handles the vCard format. (License: GPL; Language: Python.)

    Address Books

    The address book situation is a scandal. Applications have not settled on a standard for data sharing and do not even adequately document their own formats. The best documented formats, VCARD and LDIF, are not great. For such a widespread need, this is a rather astonishing situation.

    Most PIMs include address book functionality. Most email clients do as well.

    Project Management

    See Wikipedia for a comparison of project management software. Here is another comparison.

    Here is one that is not yet listed there: ProjeLead (License: GPL) Probably Trac is best known in the open source community.

    Spreadsheets

    Traditional spreadsheets:
    It has become very popular to use spreadsheets in education. This has some downsides. Traditional preadsheets are OK for very simple, one-off applications using small amounts of data. For serious work, they are too opaque, because they are too hard to document. (If you have ever tried to figure out another person’s complex spreadsheet, you know what I mean.) Particulary well publicized was the Excel error whose correction overturned a much cited Reinhart and Rogoff study. But studies indicate that almost all large spreadsheet have serious errors.1,2 Basic data handling glitches have been documented even in the most popular spreadsheet applications. The lack of transparent scripting facilities means that it is very difficult to understand someone else’s spreadsheet or even one’s own spreadsheet developed months or years ago. If all you want to educate someone to do is one-time, never-to-be-revisited, quick-and-dirty computations, then teach them a traditional spreadsheet. Otherwise teach them a format that allows serious documentation and transparency of manipulations. At the very least, eschew traditional spreadsheets in favor of newer alternatives, such as scientific spreadsheets and engineering spreadsheets.

    • Almiron, M. G., E. S. Almeida and M. N. Miranda (2009). The reliability of statistical functions in four software packages freely used in numerical computation. Brazilian Journal of Probability and Statistics, 23, 107-119.
    • Almiron, M. G., B. Lopes, A. L. Oliviera, A. C. Medeiros and A. C. Frery (2010). On the numerical accuracy of spreadsheets. Journal of Statistical Software, 34 (4), 1-29.
    • Barreto, H. and F. M. Howland (2006). Introductory Econometrics: Using Monte Carlo Simulation with Microsoft Excel®. Cambridge University Press, Cambridge.
    • McCullough, B. D. (1998). Assessing the reliability of statistical software: Part I. The American Statistician, 52, 358-366.
    • McCullough, B. D. (1999). Assessing the reliability of statistical software: Part II. The American Statistician, 53, 149-159.
    • Some problems with spreadsheets can in principle be overcome by using them directly just for data storage and then preforming manipulations via a scripting language that exploits the spreadsheet’s computational and graphics facilities.
    • There are also engineering spreadsheets that allow explicit scripting and treat data in a more object oriented fashion.

    Comment: Python can read and write tranditional spreadsheets. For simple spreadsheets see the CSV module. For more advanced needs, consider xlrd and xlwt.

    • GNUmeric is a full featured spreadsheet that competes with commercial spreadsheets. A Windows version became available at the end of 2004. Java users can produce gnumeric files with JWorkBook.
    • Oleo is a lightweight spreadsheet. Supports command-based programming.
    • abs supports the ABV macro language, which is VBA compatible.
    • TeaPot uses a third dimension instead of row and column hiding.
    • slsc
    Scientific spreadsheets, often called engineering spreadsheets, are much better working environments than traditional spreadsheets. A scientific spreadsheet treats data as objects and allows programmatic manipulation in a spreadsheet-like environment. Here are a few possibilities.
    • Picalo is a data analysis tool with a spreadsheet interface to database operations. (License: GPL; Language: Python; Scripting language: Python)
    • Resolver is a quite amazing scientific spreadsheet. Free for educational use. Sadly, no longer under development. (Scripting language: Python)
    • Pyspread is “provides an arbitrary size, three-dimensional grid for spreadsheet calculations. Each grid cell accepts a Python expression.” Cross platform. (Language: Python. License: GPL 3.)
    • A very simple but powerful spreadsheet application is simplecells.

    If you are interested in spreadsheet structures, you may be interested in Fenfire generally and ZigZag more specifically.

    Databases

    Most social scientists can probably meet their database needs with SQLite. This “is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine”. (License: Public Domain.) Turso is a rewrite in Rust that has some additional features. Turso has a large community of contributors.

    Middleware, including Object Request Brokers (ORBs)

    • omniORB fast, largely CORBA compliant. (License: LGPL)
    • ICE (Internet Communications Engine) is a high-performance Internet communications platform. (License: GPL)

    Word Processors

    AbiWord is a cross-platform, full-featured word processor with a Word™-like interface. If you want a quick viewer for MS .doc files (e.g., for your email), this loads much faster than most alternatives. It also has a wonderful equation editor, which accepts LaTeX input in a dialogue box.

    If you want even lighter weight than the very nice AbiWord, on Linux you can try Ted. Some Linux users like frames-oriented KWord.

    Cloud

    It is perfectly feasible to rely on internet applications for word processing. I have had good experiences with Google Docs for basic word processing tasks and online collaboration.

    Bibliography Management

    You will need to decide what format to keep your bibliography in, and what software to use to manage it.

    Citation Management:

    If you use a commercial word processor you will probably use the commercial EndNote to manage your reference and format your citations. However there are some interesting alternatives.

    In particular, LaTeX users have the traditional (and very powerful) BibTeX to manage the citations in their documents. Even users of commercial word processors can take advantage of BibTeX by using Bibtex4Word. New users should see the BibTeX user hints.

    For a while now, many LaTex users prefer the even more powerful (and simple) biblatex for the design of citation reference and citation styles. (Users switching from natbib will want to know about the natbib-compatibility-mode, which allows use of natbib’s commands (e.g., \citep, \citet) instead of the commands usually provided by biblatex (e.g., \parencite, \textcite).)

    Python users can consider the bib4txt component of bibstuff, which should particularly interest reStructuredText users who need bibliographic support. (I recommend you get the most recent BibStuff.) (BibStuff License: MIT; Language: Python) Chris Putnam’s Bibutils “interconverts between various bibliography formats using a common XML intermediate.” (Bibutils License: GPL; Language: C; binaries are available for many platforms.)

    If you have the DOI for a document, you can use curl to fetch a BibTeX formatted citation. (The curl command-line utility is for fectching information, including files, over the web.) For example, from Windows PowerShell:

    curl.exe -LH "Accept: application/x-bibtex" https://doi.org/10.1177/08944393241246280

    (To understand this, see the curl man page.) Pretty amazing! This uses the DOI Content Negotiation API ot fetch the information from doi.org, who passes the request to CrossRef or DataCite registration agency.

    Personal Financial Managers (PFMs)

    • PyCheckbook is a simple personal finance manager that will run on any platform that can run Python and wxPython.
    • CBB is written in Tcl/Tk and Perl, so it is highly OS-independent. Track accounts and create reports.
    • GnuCash. (Cross platform.) There are Python bindings.

    Open Financial Exchange

    Open Financial Exchange (OFX) “is a unified specification for the electronic exchange of financial data”. The format is an open standard. It is possible to convert CSV to OFX.

    Project Managers

    faces is a user friendly project management tool. (License: GPL; Language: Python)

    Task Coach is a lightweight task manager. (License: GPL; Language: Python)

    Task Juggler is very popular. (License: GPL)

    OpenOffice includes a database. GNOME Office includes MrProject, “a project planning, scheduling and tracking tool.

    CAD

    Here are two popular open-source choices.

    • LibreCAD seems to be the most popular FOSS CAD program, probably because it is compatible with the commercial AutoCAD’s formats. It also offers a C++ plugin system.

    • FreeCAD supports parameteric 3D modeling.

    Desktop Publishing

    Scribus is a featureful, cross-platform desktop publishing application. “The Scribus file format is XML based; open and completely documented.” (License: GPL) Used by professionals to send multipage full color layouts sent directly to commercial print houses. Supports CMYK separation, PDF generation, and much of the toolsets you get from commercial packages like Quark or InDesign.

    Utilities

    Character Composers

    A compose key allows inputting special characters as key combinations. Some text editors provide support for this (e.g., digraphs in Vim). Linux includes compose-key activation as a native ability. For Windows users, a few are provided via the Alt key and the numeric keypad. However, WinCompose provides better functionality. (License: WTFPL (essentially public domain).) (There is a Youtube tutorial for WinCompose.)

    Calculators

    Calculators are still useful. Here are a few of many.

    Reverse Polish Notation:
    The dc desktop calculator, for those comfortable in a shell (including cmd.exe), is cross-platform, wonderfully fast, and ever handy—highly recommended! Another cross platform possibility is kalc. For Linux you can try rpncalc. For Windows I like the freeware RPNCalc, which is also ported to WinCE. RPN is an interesting calculator for the PalmOS. And finally for PostScript enthusiasts, I cannot refrain from mentioning PSCalc.

    For a console calculator, try the cross-platform bc. (The bc manual is very good.) For a graphics calculator, try the cross-platform GraphCalc. Or just use gnuplot as a graphics calculator. GNU Emacs Calc has many features, including graphics using GNUPLOT. CoCalc is a freeware JAVA calculator.

    Rascal is enough more than a calculator that it may be considered a simple matrix programming language. This is also true of cxc, and Iguana seems to be evolving in the same direction.

    File Compression

    • The most promising free cross-platform GUI solution (well, ok, it runs under WINE in Linux) I have found is 7-zip (license: LGPL) and p7zip, which decompresses many formats including of course ZIP and RAR. However LZOP is interesting if you do not need multiple-format support. Currently most useful are probably the Info-ZIP utilities (zip and unzip). Also consider (for single files) gzip. (Windows users may be interested in Win-GZ, which provides a Windows interface to gzip, and the Wiz GUI for zip and unzip.
    • You can find web lists of freeware zip utilities for various platforms. (FreeSite|UUNet). JZip is a free WinZip clone for Windows users. Some people like QuickZip. (Of course bzip2 can also open .bz2 files.)
    • PKZip is the classic shareware compression utility.
    • UPX is a free, portable, extendable, high-performance executable packer for several different executable formats.
    • Other archive utilities for various platforms, including Windows 95.
    • And of course Python users will often be well served by the zipfile module.

    Remote Access

    Terminal Emulation
    • Gate One (HTML 5 ssh client and terminal emulator. Nice functionality!)
    • PuTTY, the classic telnet/ssh client.
    • Windows 10 since December 2017 has offered OpenSSH (client and server) as an optional feature.
    File Transfer (FTP etc)

    Check TheFreeCountry for a longer list.

    Python users get a basic cross-platform solution automatically via the ftplib module. (For an even lighter approach, try this TFTP module.) The Python Cookbook uses this module to provide a threaded ftp client. As of August 2005, ftplib does not provide any secure services, however. For SSH2 services you can use paramiko, which relies on pycrypto. These are very easy installs! (Get paramiko from the releases tab on GitHub, and see the README file for instructions. Windows users can also look at Voidspace for prebuilt PyCrypto binaries.) I provide an example (usable) SFTP client using these modules, but you can even have a graphical interface with SFTP support via wxSFTP. (If your needs are more substantial, you can use pycurl as a Python interface to libcurl, which should be able to meet all your ftp needs.)

    If you need FTP/S, you can try TSLite, which offers a pure Python solution for FTP over TSL.

    For Windows: I find the free and open source FileZilla to be excellent for FTP and SFTP. (In older versions, I have had some problems with FTP/S in passive mode.) Other possibilities: WinSCP. OpenSSH for Windows. WS FTP had a free (for academics and students), easy to use, ftp program for Windows platforms, but I think the free version went away.
    For Mac: CyberDuck.
    For Un*x: NcFTP. (Also runs on Windows and Mac, for those willing to learn ftp commands.) OpenSSH.

    Optical Character Recognition

    GOCR, Kooka, OCRShop, ClaraOCR

    Report Generation

    Generating reports is a common need. These can be informal or presentational, and may or may not need to be printed.

    • Quarto is designed for technical report generation, supports math, and has great support for reproducibility. Based on an extended version markdown and leverages pandoc. Recommended.
    • Typst is great for extremely fast PDF creation.
    • ReportLab allows direct creation of PDF graphics and reports in Python.

    If you need to convert a large collection of text-based logs into textual reports, consider gawk. Geeky but speedy. (Btw, Awk Introduction is a useful very brief introduction to Awk.)

    Although I have not tried it, I have to mention the Apache Formatting Objects Process (FOP). It appears to offers amazing flexibility. Java and XML based. (License: Apache 2.0)

    Version Control

    There are many version control systems (VCSs): see the Wikipedia list. The right answer for most economists is simple: use Git.

    Despite the recent popularity of Git, Subversion is probably the most widely used version control system. It is easier to use and has fewer foot guns. There is an extensive user manual. (Be sure to read about the basic work cycle. Simplest bottom line: change to your working directory and enter svn update, then make changes to your files. Before you commit do another update, and finally commit the changes with svn commit -m "My message about the changes.".) Users who dislike the command line should consider TortoiseSVN as a user-friendly Subversion client.

    Free and low cost SVN repositories:
    assembla (includes some free options)
    Unfuddle

    Miscellaneous Office Needs

    Security

    Track stolen laptops and cell phones with Prey.

    E-Book Readers and Converters

    Calibre has quite amazing conversion capabilities and supports many e-book formats.

    Outliners

    Outlines can help writers and programmers. Many good editors offer substantial outlining capability. Examples include the VimOutliner and the emacs outline mode. VS Code also generates helpful outlines.

    Mind Mappers

    FreePlane is an active fork of FreeMind, which is a highly capable cross-platform mind mapper. It is Java and includes and Windows installer. (License: GPL) For a more document oriented approach, try Kdissert. (License: GPL) MindMup provides free online mind mapping, including online collaboration. (License: MIT. Supported by Google Drive.)

    Tree Sheets is an odd cross between a spreadsheet and a mind mapper.

    Text Preprocessors

    The hoary standard is m4. An interesting alternative is empy. Good luck.

    Shells

    In most settings, economists will have their needs met by the default shell. However, Windows users should no longer use cmd.exe, unless forced to by circumstances. Things have gotten better with the advent of PowerShell, which can be run in the Windows Terminal. Note that PowerShell supports simple versions of many common bash commands.

    Windows users who desire a more Linux-like shell experience can use bash (or other shells) via Windows Subsystem for Linux.

    Unix Tools

    Unix Tools for Windows and System Tools
    • I suggest starting by getting CoreUtils for Windows.
    • Amazingly, in 2004 Microsoft made free what is essentially a Unix system for Windows, now called Windows Subsystem for Linux.
    • KDiff3 is a good cross-platform solution. Meld if a useful visual diff and merge tool written in Python. You may come to prefer it over gnu diffutils. xxdiff is amazing but only for Un*x users. Delta is a sophisticated implementation of the Unix “diff” command for Windows users.
    • Microsoft bought Sysinternals but continues to offer their remarkable utilities free for non-commercial Windows users, incuding the wonderful ProcessExplorer process monitor (which replaces the older Filemon and Regmon utilities).

    View and Manipulate PDF

    PDF Maniuplation
    • PyPdf offers extensive PDF manipulation and extraction facilities. (License: BSD. Language: Python.) Hint as of 2023: ignore all of the numbered forks, including PyPdf2 (which has been merged).
    • The PDF Toolkit is extremely FAST, handy, and easy to use if you need to manipulate PDF files. (Also, see the website for a Python port of forge_fdf.)
    • PDF Split and Merge provide a GUI interface to PDF file manipulation. (License: GPL; Language: Java)
    • Do not overlook the GNU psutils.
    • You can edit PDFs with pdfedit. PDF-Xchange Viewer is free and can annotate. (Commercial product.)
    • AREnable enables the commenting features in Reader.
    • GhostScript, GhostView, and GSView. Ghostview and GSView can create pdf-files. Here is one of many ways. 1. Print your documents to a file, using a postscript printer. 2. Open the file in Ghostview. 3. Print the document again to a file using the printer “pdfwrite”.
    PDF Viewing
    • The most popular viewer is the free (but closed source) Adobe Acrobat Reader. Reader includes annotation features. It’s main downsides are that it is slow and that it locks the file you are reading (so it cannot be overwritten).
    • Most browsers include very good PDF viewers (with editing capabilities). Edge provides especially capable annotation facilities.
    • For a list of free and open source readers for various platforms, see PDFreaders.org.
    • My favorite reader on Windows platforms is Sumatra PDF, which is amazing, fast, and free. SumatraPDF is based on poppler and therefore on X pdf. (xpdf is a cross platform PDF viewer, which comes with tools for PDF file manipulation.)
    • Also using poppler is Okular, “a universal document viewer based on KPDF for KDE 4.”
    • GhostView is a cross platform viewer for PostScript and PDF. (License: Aladdin Free Public Licence) It depends on the GhostScript interpreter. (License: GPL)

    Other

    Encryption

    Note that password protecting your Word files does not encrypt them. Password protection of PDF files is easily cracked, although Adobe requires that readers respect the protection. Some editors (e.g., Vim) allow easy, strong encryption of your text files.

    • PGP is the commercial classic for message encryption and disk encryption. It has roots in the OpenPGP encryption standard. GNU Privacy Guard (GPG) is a free and open source OpenPGP compliant encryption tool. (GPG is a command-line tool.)
    • TrueCrypt provides sophisticated encryption on Windows XP.
    • msieve does fast integer factorization. If your needs are a bit less demanding and you are a Python user, you can also try NZMATH.

    Stuff for Kids (and Educators)

    • Squeak may be the easiest way to get your kid into object oriented programming. The cross-platform language is not a toy! Educators may be interested in its potential for game development.
    • Alice is an innovative approach to 3d programming for kids.
    • Blender GameKit (Blender can be scripted with Python.)

    User Hints

    CSV Hints

    CSV stands for comma-separated values. Distinguish CSV and DSV. CSV is described by RFC 4180. Do not give a .csv extension to files that fail to match this description.

    Email Client Hints

    Be sure to set your client to produce plain text email. I have written up a few reason and clues.

    Thunderbird Hints

    External Editor
    Using your own editor when writing email is strongly recommended. Get the “External Editor” extension. For example, use Vim with Thunderbird as follows. Define the External Editor command to load Vim as: \pathto\gvim --nofork -c "setf mail", so you will get ‘mail’ syntax highlighting and ftplugins loaded. Or if you have defined say mail.vim, a file of useful macro, you can instead use e.g., \pathto\gvim.exe --nofork -c "so $VIM\vimfiles\mail.vim". After installing the extension, edit the composition toolbar (the one for replying to email, not the main application toolbar) and add a button for the external editor. You can then click that button and your current email reply will be opened in Vim.
    By the way, you may find my ai_mail.vim to contain some useful abbreviations and commands for email. Just drop it in your %VIM%\vimfiles folder, and change your External Editor command to, e.g., "C:\Program Files (x86)\Vim\vim82\gvim.exe" --nofork -c "so $VIM\vimfiles\ai_mail.vim".

    Thunderbird and Acrobat: Acrobat will not attach PDFs to Thunderbird emails, unless you you set Thunderbird as your default client in a very specific way. Open the Control Panel and double click Default Programs. Pick “Set program access and computer defaults/Custom (expand this)/Choose a default e-mail program, and then, click on Thunderbird. (As of Windows 7 and Acrobat 9.)

    Make sure your ‘textwidth’ when editing the email is no larger than Thunderbird’s “Wrap plain text messages at” option (in your Composition options); otherwise when Thunderbird receives your text it may wrap it to a smaller size.

    Gmail allows IMAP access, Google provides detailed instructions for configuring Thunderbird, and Thunderbird automates the process of adding your Gmail account.

    Key Configurations:
    The keyconfig.xpi extension allows you to easily change your key bindings. Carefully follow the instructions. I like to associate the d key with goDoCommand('cmd_delete'); and the x key with goDoCommand('cmd_MsgCompactFolder');.

    Pine Hint

    If you prefer to POP your mail, you can get more control over this than Pine offers with radiks, a tiny mail transfer program (MTA) for win32 (Windows 9x/NT/2000) which reads mail from a pop3 server and transfers it (filtered, if you want) to your local hard drive.

    SciPy user hints

    Use the Lapack routines if you need speed. E.g., for a QR decomposition use scipy.linalg.flapack.dgeqrf instead of scipy.linalg.qr.

    Suppose you find you need to import a module with the same name as your script. First best is to change the name of your script, but you can also
    import sys
    sys.path.remove('')
    import sets
    

    to remove the current directory from Python’s search path.
    If you then need access to any modules in the current directory, use sys.path.insert(0,'')" first.

    Lists are sorted in place, so mylist.sort() return None, but mylist is now sorted.

    R Hints

    Rossiter wrote an accesible Introduction to the R Project.

    Documentation:
    Windows users may want to read R Guide for Windows Users by Kevin Wang. Lund University offers some supplementary documentation; also Harrell’s R utilities along with his guide to LaTeX tables and S may be useful. Ikaha offers some introductory discussion of generating graphics in R.

    Be careful with the definition of R’s PRNG for the geometric distribution: rgeom has support on nonnegative integers, since R has p(x) = p (1-p)^x. A perhaps more common parameterization is p(x) = p (1-p)^(x-1): which you can match by adding 1 to the values returned by rgeom.

    Windows users can access R from Python with the RDcom server/client. This allows you to call R from Python as follows:

    from win32com.client import Dispatch
    sc=Dispatch("StatConnectorSrv.StatConnector")
    sc.Init("R")
    print(sc.Evaluate("2+3"))

    Other approaches to R/Python interaction include the following. Walter Moreira’s RPy module (requires pyWin32 under Windows) allows you to “embed” R in Python and transparently send data to it. (You can easily pass objects in both directions using OmegaHat’s R/S Plus Python Interface.) pyRserve is a simpler solution, which nevertheless allows running R on a remote server.

    Bounding Box Hints

    Occasionally you will need to provide or adjust the bounding box information for a graphic. Here are some resources.

    • pdfcrop for PDF files. (License: LaTeX Project Public License; Language: perl)
    • GhostScript and many TeX distributions include eps2eps, which can reset the bounding box of an EPS file.
    • If you have Ghostscript 6.0 (or later), the command: gs -sDEVICE=bbox -dNOPAUSE -dBATCH file.ps will print the bounding box information for file.ps (and then exit gs). You can then use this information to reset the bounding box. bbox_add.pl is a perl script that uses this approach. fixBBox.py is a Python script that uses this approach. (I have not tried these scripts.)

    AbiWord user hints

    AbiWord supports easy conversion to LaTeX, and thus easy generation of PDF versions of your documents. Here is a simple command line approach, given a document named test.abw to produce a document test.pdf.
    
    abiword --to=latex test.abw
    pdflatex test.latex
    

    AbiWord has a special feature: it supports some vi keybindings! To implement the vi keybindings, you need to make two changes your AbiWord.Profile file. (Windows users should search for this in the Documents and Settings folder.) First add another Scheme to your AbiWord.Profile file: Just add the following lines to your AbiWord.Profile file right below the already existing “custom” Scheme.
    
    <Scheme
            name="AbiVi"
            KeyBindings="viEdit"
            KeyBindingsCycle="1"
            />
    
    By setting KeyBindingsCycle=“1” (1 is on, 0 the default is off) you will be able to press F12 to switch keybinding mode: the mode will appear in the Status Bar just to the right of INS. The second step is to go to the beginning of AbiWord.Profile and find the Select tag; modify its scheme attribute to refer to the new Scheme you just typed. It should then look like this:
    
    <Select
                 scheme="AbiVi"
                 autosaveprefs="1"
                 useenvlocale="1"
                 />
    

    This is very cool. You get into insert mode by pressing i and out by pressing esc. A number of basic cursor motion keys (including h j k l w b a A ^ $) and core commands (including O o D x) are implemented, along with / for a search dialog. See http://www.abisource.com/mailinglists/abiword-dev/99/April/0089.html for a list of implemented commands, but a few do not currently work.

    Acrobat hints

    When you add comments to a document, the comments are stamped with a name, a date, and a time. This may well be more information than you want to provide. You can remove the name stamp from all your comments as follows. Show the comment list: pick Comments » Show Comment List from the menus. Select all comments: click on one, and then press “ctrl-a. Change the comment properties: right click on your selection, click “Properties, pick the “General” tab, and change the Author field (e.g., nothing). Unfortunately, you cannot remove the date and time stamps this way. However, only the “modified” stamp shows to the reader, when you change the author this way, it should update the modified time on all the comments.

    Aspell user hints

    Installation hints for Windows users: Go to http://aspell.net/win32/ and get the setup program, available as a complete installer. Run the setup program. Next get and install the a dictionary (e.g., the English dictionary). Now you are read to run aspell. E.g., at a command window type c:\programs\aspell\bin\aspell check c:\temp.tex (assuming that’s where you put it, of course). You may want to change your path so that aspell is in it.
    Running Aspell from Vim: To run aspell from Vim, just add a mapping to your _vimrc or .vimrc file. Here are two examples. The first assigns spell checking to the familiar F7 key.
    
    map <f7> <esc>:w<cr>:!aspell check %<cr>:e! %<cr> 
    (Use the complete path if you didn’t put aspell in your path). Note that if you take this approach the changes are permanent! (I.e., you cannot “undo” them.) Leave out the last command if you want to be able to change your mind. Here is a slightly different version.
    
    map <Leader>s <esc>:w<cr>:!aspell --dont-backup -c %<cr>:e! %<cr><cr> 

    To understand these, see the Aspell and Vim helpfiles! In either case, make sure aspell is in your path or use the fully qualified file name.

    Windows command shell hints.

    Redirection: see Microsoft’s documentation. I often need to redirect all script output to a text file, both stdout and stderr. Example:
    python -c "import scipy;scipy.test()" >c:\file.txt 2>&1
    

    In PowerShell, use the out-file commandlet.

    PyX user hints.

    Installing PyX from SVN gets you the most recent changes and is trivially easy. (Preliminary: install SVN.) At the command line, create a build directory with svn co https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx pyx and then change to your new pyx directory and enter setup.py install.

    PyX will produce EPS files with negative bounding box parameters. This is perfectly legal but confuses some applications. In particular, LaTeX users of dvipdfm may see a clipped figure. Fixing this is simple: ask PyX to write your figure with a specified paperformat. E.g.,

    mygraph.writeEPSfile("c:/mydir/myfig.eps",paperformat=pyx.document.paperformat.Letter)

    One lovely use of PyX is to include an existing EPS file and add things to it (e.g., LaTeX text, or JPEG graphics). When you write out the result with writeEPSfile method of your canvas, be sure to set bboxenlarge=False to ensure a “tight” bounding box.

    For 2-D data plots, Titus Winters has written a nice PyX tutorial.

    Be sure to see the examples and gallery on the PyX website. I provide a heavily commented elaboration of the shaded integral example.

    For a simplified interface to PyX, you can add PyXgraph or, if you would like an interactive command line interface, PyXPlot. For geometry, geoPyX is limited but useful.)

    User Hints: Mathematica

    Get all secion header cells with Cells[CellStyle → {"Section"}]. The result is a list of cell objects, on which you can set any options by assigning to its CurrentValue:

    Do[
     CurrentValue[cell, ShowGroupOpener] = True,
     {cell, Cells[CellStyle → {"Section"}]}
    ]

    Using version control with Mma notebooks is a bit messy but can be made fairly workable. In a Mathematica notebook that you want to put under version control, go to Format » Option Inspector... in the menu. In the top-left dropdown, set the option scope Selected Notebook. Find FileOutlineCache under Notebook Options » Private Notebook Options, and set this option to False. (This may make opening the notebooks a bit slower.) Similarly, under Editing Options, set TrackCellChangeTimes to False
    Command approach:

    SetOptions[InputNotebook[],
     PrivateNotebookOptions → {"FileOutlineCache" → False},
      TrackCellChangeTimes → False
       ]

    Save your notebook and it will save with much less clutter and many fewer changes. To do even better, as a preliminary to committing your changes, delete all your output cells and then save your notebook. (You can use the menus or FrontEndTokenExecute["DeleteGeneratedCells"] for this.)

    You may find SciDraw helpful for better looking Mathematica drawings. In order to make your Mathematica plots more stylistically compatible with a LaTeX document, consider using:

    Scientific Notebook and Scientific Word user hints

    On Windows, to fix font problems on the display, make sure the Windows Multilingual Support is installed. If that is not an option, go to Tools, User Setup, Font Mapping and check the Use Symbol Font mapping box.

    Be sure to learn the keyboard short-cuts: see especially the help for Key Prefixes. For example, you can logical negation as ctrl-s,N and the partial derivative sign (∂) as ctrl-s,d. (See the Help search.) Also, I strongly recommend changing the default settings under Tools, UserSetup, Math: set it so that two spaces switches to math and a space at the end of math switches to text.

    Graphics: When using the JPGs or TIFFs, edit the file tcispech.ini and change the setting for MaxGraphicsMemoryUsage. Try doubling or tripling the default setting of 4000.

    When using EPS graphics, save your document using the Portable LaTeX filter and change the options for the graphicx package to use dvips. The graphics will only appear when printing, but they should appear.

    Subversion User hints

    Subversion is easy to use and excellent for individuals and small groups. Here is a ten minute tutorial. Windows users who prefer to avoid the command line can just use TortoiseSVN.

    Remember your work cycle must be a very rigid UMUC sequence:

    1. before you start work, update
    2. modify your working copy (do your work, and test it)
    3. update again (and resolve any conflicts)
    4. as soon as possible, commit your changes

    To work across platforms, you must not use file or folder names that are illegal on any of the platforms. Windows users cannot use the following (which are reserved device names): CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. They also cannot use these names followed by an extension, for example, NUL.txt or com1.png.
    Suppose a contributor creates com1.png on a Mac and commits it to the Subversion repository. When Windows users try to update, the update fails horribly. (How horribly? Unfixably. They will have to get a new checkout after the problem is fixed.) The contributor of the file should “svn rename” it to a name legal for Windows, and commit that change. Then the problem for Windows users will go away.
    Bottom line: never ever use such file or folder names!

    How to resolve Subversion Conflicts

    Suppose you want to add a directory mydir under version control, but it contains a bunch of files you do not wish to track. You can add the directory but not the files as follows: svn add --non-recursive mydir.

    One disappointing thing: it would be nice to add a directory and all its files except those matching the svn:ignore property. Subversion does not currently support this. Here is one work around.

    You can set an editor (e.g., for commit messages and property editing) in the Subversion config file. On Windows you should be able (after installing Subversion) to find it here: \Users\YourUserName\AppData\Roaming\Subversion. Search for editor-cmd and follow the instructions. (On Windows, I am currently using editor-cmd = C:/programs/Vim/vim74/gvim.exe -f. If you use a path with spaces in it, you will have to quote it.)

    Once you ensure that Subversion has access to a text editor, you can edit the list of patterns it will ignore in any directory. E.g., svn propedit svn:ignore . (note the final period) will edit the patterns for the current directory.

    svn diff -r HEAD myfile shows differences between myfile and the repository. svn status --show-updates shows you which files in the repository have changed.

    It is useful (and probably best practice) for any plain text files to svn propset svn:eol-style=native *filename*. This is not the default, but each user can make it a personal default by editing the [autoprops] of their Subversion config file. From Subversion 1.8 onwards, it can be set as a default at the repository level with Repository Dictated Configuration.

    It is a good idea to lock binary files, to help ensure only one person changes them at a time: svn propset:needs-lock yes *filename*.

    Docutils User hints

    If you are using rst2latex, it will include the following in your header: \usepackage[T1]{fontenc}. Unfortunately, on its own, this will probably lead to the use of bitmap fonts and thus “fuzzy” screen output. According to Guenter Milde, there are several reasons for this choice.
    • T1 is the recommended (by the LaTeX team) font encoding. (OT1 is the default only because of the TeX policy of no changes to the defauls, not even improvements/fixes.)
    • Using the advantage of the several output options for a common source, documents for web viewing are best produced with the HTML writer and the print version with the LaTeX writer.
    • While the bad look will be visible at first glance, use of the traditional OT1 encoding will make text extraction faulty. (That is, it creates problems with search and extraction of text that contains characters outside the ASCII range.)

    The real question is what to do about it. The recommended workaround is to select a T1-encoded “Type 1” (vector) font. For example you can use Latin Modern either by adding it to your LaTeX style sheet (\usepackage{lmodern}) or by using a Docutils command line argument (--stylesheet=lmodern). Another popular solution is the “Times/Helvetica/Courier” combination, which you can get by adding the following to your style sheet:

    \usepackage{mathptmx}            % Times for serif and math
    \usepackage[scaled=.90]{helvet}  % downscaled Helvetica for sans serif
    \usepackage{courier}             % Courier for teletype (mono-space)

    or with the following Docutils command line options:

    --documentoptions="scaled=.90" --stylesheet="mathptmx,helvet,courier"

    You can also just turn it off with the following Docutils command line option: --font-encoding=OT1 (or even --font-encoding="").

    JabRef User hints

    1. Go to http://jabref.sourceforge.net/ and click Web Start, to start the JabRef reference manager.
    2. To enter a new article, click the green + and click Article. To enter a new working paper, click the green + and click TechReport.
    3. Multiple authors are separated by and (not by commas).
    4. Do not put quotes around titles.
    5. Use two hyphens for page number ranges (e.g., 99–101). For page numbers, put only the page ranges (e.g., no “pp.”).
    6. For articles you will often have volume and issue number data, like vol. 2 no. 1 or 2(1). The volume is entered on the Required tab and the issue number is entered on the Optional tab.
    7. Months are entered like this: #jan#, #feb#, #mar#, etc. (Three letter abbreviations bracketed by hash marks.)
    8. The url field is under the General tab.
    9. If you are missing information for any Required fields, you can often get the missing information from RePEc (http://ideas.repec.org/) if you do a Google search on the title.

    Matplotlib User Hints

    Matplotlib is included in many Python distributions, including Enthought Canopy. If you install it your self, be sure to read the installation instructions. Before installing Matplotlib, you will certainly need to install NumPy.

    To get the most from Matplotlib, you need to clearly understand the difference between a figure instance and an axes instance.
    A figure instance the basic container for an entire chart, like a figure in a journal article. A figure instance can contain multiple axes instances, each of which can be used for plotting or drawing.
    We can call the add_subplot method to add non-overlapping axes instances to our figure. (But if you call add_subplot again in a way that overlaps your previous subplot, this replaces your previous axes in the current figure.)

    import matplotlib.pyplot as plt
    fig1 = plt.figure()
    ax1 = fig1.add_subplot(1,1,1)
    #now draw on ax1
    fig2 = plt.figure()
    ax2a = fig2.add_subplot(2,1,1)
    #now draw on ax2a
    ax2b = fig2.add_subplot(2,1,2)
    #now draw on ax2b

    You can use the subplots convenience function to do figure and axes creation at one go.

    fig, ((ax1,ax2),(ax3,ax4)) = plt.subplots(2,2)

    Here is a simple example for creating a figure and displaying it onscreen. (For completeness, we illustrate the explicit choce of a GUI “back end”, although this is usually not necessary.) Note the hierarchical approach: the pyplot interface creates the figure object, the figure object creates the axes objects, and the axes objects create the other objects (including, implicitly, the axis objects).

    # preliminaries
    import matplotlib
    matplotlib.use('TkAgg')  #note choice of GUI backend!
    import matplotlib.pyplot as plt
    # create a new figure
    fig = plt.figure(1)
    ax = fig.add_subplot(1,1,1)
    ax.plot([1,2,3],'r-')
    ax.set_title('Easy Line Plot')
    # display your figure onscreen
    plt.show() 

    Here is a simple example for creating a figure and saving it, without displaying it onscreen. (I.e., no GUI.)

    # preliminaries
    import numpy
    import matplotlib
    matplotlib.use('Agg')  #note choice of backend: no GUI!
    import matplotlib.pyplot as plt
    
    #create some artificial data for this example
    x, y = numpy.random.rand(2,50)  #the data (50 points)
    # create a new figure 
    fig = pyplot.figure()
    #add an axes instance to draw on
    ax = fig.add_subplot(111)
    #do your drawing
    ax.plot(x, y, marker='.', linestyle='', markerfacecolor='blue')
    ax.set_title('Scatter dots')
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    # save figure to file
    fig.savefig('/temp/myfig.png', dpi=96)

    Matplotlib’s pyplot facilities are convenience facilities for the user with modest needs. For some examples (e.g., embedding Matplotlib in other applications) it is important not to use these facilities. In this case, you can altogether avoid using pyplot, but you will need to handle figure and canvas creation yourself.

    # example by John Hunter.
    from matplotlib.backends.backend_svg import FigureCanvasSVG
    from matplotlib.figure import Figure
    fig = Figure()
    ax = fig.add_subplot(211)
    ax.plot([1,2,3])
    ax.set_xlabel('time')
    canvas = FigureCanvasSVG(fig)
    canvas.print_figure('myfile.svg')

    As another example, here is our earlier example redone to be more fully object oriented.

    # preliminaries
    from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
    from matplotlib.figure import Figure
    # create a new figure
    fig = Figure()
    ax = fig.add_subplot(111)
    ax.plot([1,2,3],'r-')
    ax.set_title('Easy OO Line Plot')
    ax.set_xlabel('x')
    ax.set_ylabel('y')
    canvas = FigureCanvas(fig)
    canvas.print_figure('temp.eps')

    All Matplotlib plotting functions trigger autoscaling. This affect, e.g., setting the axes limits. To prevent your limits from being overridden, call xlim/ylim after any plotting functions. Alternatively, you can turn autoscaling off:

    gca().set_autoscale_on(False)

    Subplots are pretty close to each other: if you stack two and label both horizontal axes, the top plot’s label overlaps the bottom plot’s axis. Fix this by using Figure.subplots_adjust, like this:

    figure()
    subplots_adjust(hspace=0.4)  # default: 0.2
    subplot(211)
    subplot(212)

    Fans of Edward Tufte may wish to look at etframes.

    Note that if you set_aspect on a axes instance you will still need to apply_aspect as well (or call draw).

    Matplotlib is capable of fully object oriented graphics programming. There is a very useful tutorial. If you want to embed Matplotlib in a GUI, you must use the object oriented API and not pyplot. The Matplotlib website includes examples of embedding. (For example, embedding_in_qt.py.)

    Changing Matplotlib backends:

    You have to call ‘use’ before importing matplotlib.pyplot; the backend choice must be set at the time of the matplotlib.pyplot import. For example,

    import matplotlib
    matplotlib.use('GTKAgg')
    from matplotlib.pyplot import *

    If you need to control the placement of a Matplotlib figure, you need to work a bit because it is “back end” dependent. According to John Hunter, “the matplotlib Figure is embedded in a FigureCanvas which is typically a GUI widget embedded in a GUI Window. In the pylab interface, the canvas is managed by a FigureManager, which has a window attribute on most of the backends.” He provides some examples.

    # GTK backend 
    from pylab import * 
    import gtk
    figure(1)
    plot([1,2,3])
    manager = get_current_fig_manager()
    # see gtk.Window class docs at
    # http://www.pygtk.org/pygtk2reference/class-gtkwindow.html
    manager.window.set_position(gtk.WIN_POS_CENTER) 
    figure(2)
    plot([1,2,3])
    manager = get_current_fig_manager() 
    # see gtk.Window class docs at
    # http://www.pygtk.org/pygtk2reference/class-gtkwindow.html
    manager.window.set_position(gtk.WIN_POS_NONE) 
    show()

    Another user offered a WX example:

    # WX* backend (manager.window is a wxFrame)
    # http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin_wxframe.html#wxframe
    figure(1)
    plot([1,2,3])
    manager = get_current_fig_manager()
    manager.window.SetPosition((100,100))
    #or: manager.window.Centre()
    show()

    Todd Miller offered a TkAgg example:

    # set the window position to X=200, Y=300
    get_current_fig_manager().window.wm_geometry("+200+300")

    To get the equivalent of gnuplot’s set xzeroaxis and set yzeroaxis, use axhline() and axyline(). Prior to version 0.63, Matplotlib does not have an equivalent of gnuplot’s set xzeroaxis. (This draws a horizontal line across the xrange at y=0.) John Hunter explains how to achieve the same effect, and it provides many insights into matplotlib. “What you want to do is plot a line where the y coord is in data units and equal to zero, and the x coord is in axes units and spans the xrange. The line stretches from left to right regardless of the xlimits. Each axes provides a data transform and an axes transform, so that you can specify lines/text/etc in either coord system; axes coords are 0,0 for lower left and 1,1 for upper right. But what you want to do is mix the data and axes transforms for x and y. The transforms module provides a helper function for this. The following code is freestyle (untested) but should work:

    from matplotlib.transforms import blend_xy_sep_transform
    ax = gca()
    trans = blend_xy_sep_transform( ax.transAxes, ax.transData)
    plot([0,1], [0,0], transform=trans)

    You can set an arbitrary color for any matplotlib plot. E.g., pyplot.plot(d, f(d), color = (1,0,0)).

    To get rid of the redundant ticks on the top and right edges:

    ax = pyplot.gca()
    ax.get_xaxis().set_ticks_postion('bottom') 
    ax.get_yaxis().set_ticks_postion('left') 

    Note that you should call show only once in a script. But sometimes you want to alternate seeing plots and doing computations. See http://stackoverflow.com/questions/458209/is-there-a-way-to-detach-matplotlib-plots-so-that-the-computation-can-continue for a discussion.

    In an Axes3D object, the .xaxis and .yaxis refer to the axis for the draw space, not to the the 3d projected axis. The latter are .w_xaxis, .w_yaxis, and .w_zaxis. (Thanks to Ben Root for pointing this out.)

    EViews User hints

    Eviews 6 had some bugs and some annoyances.
    • If you run a program that shows a graph and then creates and new page in your workfile, the old page remains active. (Very serious!)
    • String concatenation does not work when string variables are used in commands.
    • Table copying to clipboard is very badly broken. Tables can be copied to clipboard only as tab deliminted text. This is almost useless: it does not reproduce the table formatting. Space delimited text would be more useful. RTF is clearly needed. LaTeX would be helpful.
    • Table writing to disk is very badly broken. The tab-delimited text export does not reproduce the table formatting (e.g., of regression results). It looks like this is essentially a CSV table with tabs substituted for commas: is anyone actually using this format? Space delimited text would be more useful: at least it could be directly inserted in a document. HTML export of user modified tables (e.g., of regression results) is buggy. RTF export works OK: one must assume this is the only option used by the EViews developers.
    • Text objects have no useful methods.

    Up to version 4, the save command is not correctly documented in the EViews documentation. If you provide a filename as an argument, it is really equivalent to File.SaveAs. That is, it saves under the new name and changes the name of the current workfile. In fact, as of version 4, this is the only way to change the name of a workfile in RAM.

    In Eviews3, you could use scat(r) to get in a single graph multiple scatter plots with their regression lines. This is not possible in EViews4, where the replacement linefit command only uses the first two members of its group argument.

    missing observations: @obs(x[,s]) gives you the number of non-missing observations in x in the current sample or in sample “s” if the option is listed. One can access the number of non-missing observations for a group with @comobs.

    String substitution is very useful in EViews. For example, you might write set a string variable, say %param1, equal to a complicated function of parameters, which recurs in a system estimation. As a simple example:
    %param1 = "c(1) + c(2)"
    system1.add y = c(1)* x1 + x2/({%param1})
    
    Oddly, string substitution only works for procs (commands) and not for assignments (using = ). For example,
    scalar trythis = ({%param1})
    

    doesn’t work. (In this case, EViews will look for an object named c(1)+c(2) without evaluating the expression.)

    ffmpeg User hints

    To reduce the image image resolution, use a video filter. E.g., ffmpeg -i myinfinle.mp4 -vf scale=iw/2:ih/2 myoutfile.mp4 (Here iw and ih hold the input resolution width and height. See the filters documentation.)

    To extract part of an MP4 file, copy the audio (acodec) and video (vcodec) for a stime range. E.g.,

    ffmpeg -ss 00:00:00 -to 00:10:00 -i myinfile.mp4 -acodec copy -vcodec copy myoutfile.mp4

    extracts the first 10 minutes. (See the documentation of time durations.)

    You can pipe a series of frames (e.g., Matplotlib graphs) to FFMPEG to produce an animated graph.

    You can create PNG files named (frame000.png, frame001.png, etc) and do ffmpeg -b 8000 -f mpeg2video -r 30 -i frame%03d.png movie.mpeg. You can also produce an AVI like this: ffmpeg -r 10 -i frame%03d.png -f avi -vcodec msmpeg4v2 -y movie.avi. Works great! Note that AVI supports very low framerates; MPEG does not.

    Vim User hints

    Vim is free and open source software; get it here: https://www.vim.org/. If you are new to Vim, get some documentation. Be sure to do the Vim tutorial and to read the help for “navigation”. If you want additional documentation, consider Vi Improved—Vim by Steve Oualline or Vim ge-packt by Reinhard Wobst.

    Windows installation hints:

    Installation creats a vim directory. Below that is a vimfiles directory. For Windows users who are new to Vim, i. copy my share_vimrc.vim file to your vimfiles directory, and then ii. look for the _vimrc file in your vim directory and add at the bottom of that _vimrc file the following command: source $VIM/vimfiles/share_vimrc

    Getting started:
    Look for a file called vimtutor or vimtutor.bat. Set aside 20 minutes for the tutorial, and then run the tutorial (e.g., by clicking the file icon). When you want to go deeper, look at the Vimcasts videos.

    The Vim cursor stays in the viewing window, in contrast with some Windows applications. If you want to cursor down and then return to where you started, set a mark before moving. (See :h marks.) But, if you want to be able to page down and then page back up to where you started, use ctrl-d and ctrl-u rather than Pg-Dn and Pg-Up.

    Digraphs allow simple and intuitive keyboard entry of unicode characters. Vim digraphs are based on RFC 1345. See :h digraph-table.

    To find the non-ASCII characters in a file, use a regular expression. To search for characters outside of the ASCII range, search for [^\x00-\x7F]. (Alternatively, use decimal values: [^\d0-\d127].) However to search for individual non-ASCII characters, see the help for %o.

    Colorscheme:
    Vim provides excellent syntax highlighting in various color schemes. There is an online gallery. You can get a list of all the installed colorschemes by entering colorscheme &lt;ctrl+d&gt; at the Vim command line. (Do not forget the space.) I particularly like koehler, a rather dark color scheme. (Download from GitHub.) You can set this by entering colorscheme koehler at the Vim commmand line. Another popular dark color scheme is solarized. (Download from GitHub.) To determine your current color scheme, enter echo g:colors_name at the command line. (If you did the tutorial, you know you can reach the command line by pressing Esc.)

    Buffers:

    A buffer is a file open for editing. Use the :ls command to list your current buffers. This list is not interactive. However, while looking at this list, you can e.g. enter :b10 to switch to buffer 10.

    Tabs:

    Vim uses tabs in a unique way. They are called tab pages, and they are essentially an arrangement of windows open on some of your buffers. (A buffer is a file that has been opened for editing; a window is an area to view a buffer, and a tab page is a collection of windows.)

    Syntax Highlighting

    Vim has excellent syntax highlighting. However, by default it does not use a lot of context. In many settings, I find it useful to set syn sych minlines=300. When necessary, you can syn sych fromstart, but this may cause a slowdown in very large files. (See the help for syn-sync.)

    Python:
    Vim cooperates with some scipting languages, including Python. See :help :python, :help python-examples, and especially :help python-vim. Start with
    :python import vim
    :py cb = vim.current.buffer
    

    Note that cb is now an iterable container of strings. You can assign to the i-th line by assigning to cb[i].

    Exiting a buffer: it is usually recommended to exit a buffer using bnext. However I sometimes prefer to delete a buffer as I leave it. Examining the help for bar, we see that :w|bd can be used to write and then delete a buffer.

    Spell Checking

    Vim 7+ includes spell checking. Spell checking is affected by syntax highlighting, which identifies groups (e.g., comments). For spell-checking longer LaTeX documents, I find I need to setl spell syntax spell toplevel. This ensures spellchecking of text that is not in a syntax item. To make this permanent, you can include it in ~/.vim/after/syntax/tex.vim. You can also the values of syn sync maxlines and syn sync minlines in the same file. (See the help for :syn-sync.) If the file is not too big, you can even always start from the top with syntax sync fromstart.

    Registers

    Learn to yank to registers. For example, to yank (i.e., copy) the entire buffer you are working on into the clipboard, use :%y+. (The colon move to command mode, the percent sign picks all lines, the y is to yank, and the plus sign picks the clipboard register.)

    BOM

    To remove the BOM from a file, set nobomb.

    Learning

    There is a nice book devoted to learning Vim: Vi IMproved by Steve Oualline, also called the VIM book. You can view the Vim book online.

    Be sure to try Jeff Lanzarotta’s bufexplorer.vim. (One warning: as of early 2001, the buffer delete command in bufexplorer uses bd!, so changed buffers will be deleted upon request without a warning. Change this to bd.)

    Thesaurus: You can adapt the Moby thesaurus for use with Vim.

    Ctags is no longer included with Vim (it has grown into a project of its own.)

    A useful plugin is Universal Text Linking, which executes URLs in plain text (e.g. call webbrowser, link MS Word documents, text files, embed vim commands).

    Vim supports folding! You may find it useful to begin your writing with an outliner.

    For user questions you can turn to the Vim mailing list. There is an archive.

    Note that for all systems the Vim distribution is split into an archive with runtime files (documentation, syntax files, etc.) and a binary and/or source archive. You should download at least two archives!

    To change line spacing see the help for linespace. To change the font in gvim, you can use the menu dialog Edit/SelectFont, or you can include your selection in your _gvimrc file. (I use set guifont=andale_mono:h9,courier_new:h10.) Text editors should only use monospace fonts.

    If you type very slowly, you need to slow down Vim’s macro recognition. See the help for map-typing. I recommend resetting timeoutlen according to the example in the help for timeoutlen.

    • '. takes you to your last edit
    • Count the occurences of a pattern with :%s/pattern//ng.
    • Count the number of words in a file with g ctrl-g.

    PostScript User hints

    If you want to fill an entire page with background color, you do not need to know the dimension of the page. Just start your PostScript program by setting the color and then giving the command clippath fill. (Of course few printers can print to the exact edge of the page.)

    Transparency: PostScript uses an opaque imaging model. It does not support transparency. However, there is a workaround available if you have Adobe Distiller. You can add a “PDFMark” to your Postscript file to set the transparency for an object. When Adobe Distiller processes this PDFMark, it will set the transparency for the object.
    Lancaster offered an early discussion. (Start there rather than with the pdfmark Reference Manual.) Also, note that GhostScript supports transparency.

    LaTeX User hints

    Use pdflatex (or possibly luatex) to compile your documents. Use tikz for your drawings.

    To get double spacing, use \usepackage{setspace} \doublespacing. This should leave your figures and tables alone.

    Do not use the eqnarray environment. Lars Madsen explains why. Instead use one of the beautiful amsmath environments.

    For nice theorem and proof formatting, consider combining the following three packages: amsthm, thmtools, and thmbox. (The last is just to redefine the proof environment.)

    Listings

    If you use linerange markers with the listings package, make sure your markers do not include hyphens. (These will be treated as indicating the linerange break.)

    Using LaTeX to produce PDF files with graphics is pretty easy as long as you are producing clean graphics. But you need to pay attention to some details.

    If you are producing your PDF files with dvipdfm, then you will find it easiest to use EPS graphics. (EPS is also the primary standard for publishers.) Historically this has been my preference, but lately I’ve been working more with pdflatex.

    1. Problem: a few applications (mostly on Windows) do not produce EPS graphics. In this case, you can produce JPEG files and either i. learn how to include .jpg files, or ii. convert JPEG to EPS or sam2p (which is fast and easy), iii. switch to pdflatex
    2. If you are using pdflatex to produce your PDF files, you cannot include EPS graphics directly. You can either
      1. convert your EPS graphics to PDF, using eps2pdf
      2. produce your graphics in a supported format, such as PDF or JPEG
      3. set up your document to convert EPS to PDF on the fly
      Trevorrow suggests leaving off the extension (.eps) when you includegraphics and putting the following in your preamble:
      \ifx\pdfoutput\undefined
      % we are running LaTeX, not pdflatex
      \usepackage{graphicx}
      \else
      % we are running pdflatex, so convert .eps files to .pdf
      \usepackage[pdftex]{graphicx}
      \usepackage{epstopdf}
      \fi 
      
    In any case, use the graphicx package and include your graphics. Example:
    
        \documentclass{article}
        \usepackage{graphicx}
        \begin{document}
        \begin{figure}[htp]
        \centering
        \includegraphics[width=\textwidth]{c:/temp.eps}
        \caption{Test Figure}
        \label{f:mytestfig}
        \end{figure}
        \end{document}
    

    Note the forward slash in the path name, as always with TeX. (You can omit the path if you i. keep your graphics files in the same folder as your .tex file, or ii. configure your LaTeX to look in the folder containing your graphics files.)

    On the one hand it is easy enough to zip up all your EPS files with the embedding LaTeX document. On the other hand, one of the attractions of the LaTeX picture environment was that your drawings were present in your .tex file. Here is a way to get almost the same thing with EPS files. Add the moreverb package. Put your EPS file in a verbatimwrite environment in your .tex file. You will have to provide a file name that it will be written to, but once it is written you can read it into a figure as usual. (An alternatie is to generate your figures with embedded gnuplot commands, using the egplot package.)

    If you need to wrap text around a figure, use the wrapfig package. Include the package (in your preamble) and then the syntax is almost like that for the figure environment.
    \begin{wrapfigure}{R}{2in}
    \includegraphics[width=2in]{example.eps}
    \caption{Example Caption}
    \label{fig:xmpl}
    \end{wrapfigure}
    

    BibTeX User hints

    • The most important hint will undoubtedly prove the least welcome, but here it is anyway: restrict your characterset in your BibTeX databases as follows. For the cite key use only ASCII characters, and do not use the colon or plus sign. Instead of the key name1+name2:date:journal use the key name1.name2-date-journal.
      This is not for the sake of LaTeX use, but rather to allow you to use your database with other applications where id and name tokens may be restricted. Suppose for example you want to use your keys as the name or id attribute in an HTML or XML document. The colon is allowed in HTML but is reserved in XML for namespace specification. The plus-sign is not allowed in either specification. XML allows a whole bunch on non-ASCII characters but HTML does not.
    • Managing Citations and Your Bibliography with BibTeX by Jürgen Fenn is a good introduction to using BibTeX.
    • If you use cross referencing in your .bib files, there are two important peculiarities. Any book entry that is crossreferenced must come after the referring entry in your .bib file. Also, BibTeX cannot use the TITLE field in the referenced entry in place of a BOOKTITLE field in the referring entry. So in your referenced entry you should include both a TITLE and a BOOKTITLE field (despite these being duplicative). This should be fixed in BibTeX version 1.0 and above.
    • When you create a BibTeX data base, use appropriate capitalization for all titles. Lower case will be forced by certain styles (like AU-CMS), so you do not have to worry about that. But other styles will maintain the capitalization you provide, and these rely on your correct provision.
    • Use obvious cite keys (like mankiw.etal-1994-qje) so that your bib files remain useful to you years later.
    • When entering months, always use the default abbreviations (e.g., month = jan,) so that months will end up correctly formatted. (If you say, month="Jan.", it will always be formatted that way.)
    • Page ranges should be entered in LaTeX format, e.g. 29–32 not 29-32.

    Gnuplot User hints

    Since gnuplot is a plotting package, it offers limited data manipulation facilities. These can be increased by the use of gawk, which gnuplot can talk to nicely. Alternatively you can manage your data in Python and use a Python interface to gnuplot, such as PyGnuplot. In this case, if you use gnuplot’s fit command, you should consider how to get the results back into Python.

    Gnuplot supports palettes (themes).

    Be sure to use the valuable documentation that gnuplot includes. Begin by typing “help introduction” at the gnuplot prompt, since this explains the syntax used in the help documents.

    The command to load a script is load. Provide your file name in quotes, using forward slashes.

    Remember that gnuplot distinguishes integers and floats by the presence of a decimal point. Make sure your real numbers are recognized as real by including a decimal point. Integer division produces an integer result. For example, \(3/2=1\) but \(3./2=1.5\).

    To easily plot a cobweb plot (i.e., Verhulst diagram with gnuplot, see this article.

    Setting the color of plots is not well documented. Do it by setting the linetype variable. To see the linetypes, type test at the gnuplot command line.

    To draw a 3-D scatterplot, try

    splot 'data.asc' with points palette

    You can draw a line segment by setting an arrow with the “nohead” parameter.

    Suppose you want a log scale on the y axis but you want to display the numbers as base raised to an exponent.

    set log y 2.0
    set format y '2^%L'

    The basic way to place single points is with the label command. Use the ‘front’ option to make sure that they are placed after lines are plotted. If you know the location, you can also place a point as a data plot of a single value. E.g.,

    plot '-' with points ps 3
    1 1
    e

    centers a point at (1,1).

    If you would like to use gnuplot to create a drawing with no plots in it this is possible. Just be sure to set the yrange, then plot 0/0 after all your drawing commands.

    Up to version 3.8j, gnuplot arrowheads are not offset to account for their miter. This means they generally extend past the point where you expect them to stop. There is no satisfactory workaround, but you can try drawing a filled arrow with a very narrow pen and then redrawing just the tail (as a headless “arrow”) with a thicker pen.

    Kawano offers a brief overview of how to generate numerical plots using gnuplot.

    Windows hints

    The default in Windows is to prevent you from seeing the extension to a filename. You can fix this as follows: open the Control Panel and open Folder Options, then pick the View tab and uncheck Hide File Extensions.

    Windows File Search: Basic file search in Windows is indexed. To search all files, use advanced search and check “Include non-indexed”. It can also be useful to change what is indexed.

    To drop to a command shell from File Explorer, use Shift+RightClick to open a menu with that option.

    Windows 10 PowerToys includes a Keyboard Manager, for key remapping. This is useful for mapping CapsLock to Ctrl.

    LaTeX hints

    New LaTeX users on Windows may wish to read these hints

    Suppose you want to use a non-standard document class, say a thesis class to format your LaTeX thesis. You need LaTeX to be able to find the class (.cls) and class option (.clo) files. Here are some options for providing this information. (For more information, see the MiKTeX documentation.)
    • Put them in the same folder as your thesis.
    • Put them in an arbitrary folder that you point to by setting the TEXINPUTS environment variable. (E.g., on Windows you might use the set command or go to Advanced System Settings via the Control Panel. Users of the Bash shell might use the export command.)
    • Put them in an arbitrary folder that you point to by using the --include-directory option when you call pdflatex.
    • Put them in a properly (TDS) structured localtexmf folder, and then refresh your LaTeX database.

    To include graphics in your document, use the graphicx package. Keep your images grouped together, and point to them with the \graphicspath command. (Some knowledgeable users suggest setting TEXINPUTS instead, e.g., http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2618.) Note the odd syntax for \graphicspath: each path must be in braces and must end with a forward slash. If you want an images directory searched recursively (say because you put each chapters images a separate folder), end the path with a double slash. E.g., \graphicspath{{images-eps//}{images-pdf//}}.

    TikZ hints

    Most important: the TikZ/PGF manual is very helpful. Also, Crémer provides a useful introduction.

    The intersection coordinate systems are very useful. E.g., (A |- B) takes the first coordinate from A and the second coordinate from B. See the PyX manual.

    The arc command feels odd, especially to those with PostScript experience. Instead of inputting a circle center, you must give the start point for the arc. Suppose we want to draw an arc from from a circle centered at (1,1) with a radius of 2, say from 30 degrees to 60 degrees. You can do that like this: \draw (1,1) +(30:2) arc (30:60:2)

    Parametric plots are easy. E.g., \draw[domain=-20:0, smooth, variable=\t, samples=200] plot({cos(\t r)*exp(0.1*\t)}, {-sin(\t r)*exp(0.1*\t)});

    To place text along a line, use the sloped keyword: \draw (0,0) -- (5,1) node[above,very near end,sloped] {text}

    You can use tikzset to set the default arrowhead style for your document: \tikzset{>=latex}.

    Predefined line thicknesses are: ultra thin, very thin, thin (the default), semithick, thick, very thick, ultra thick. You can also set the line width explicitly: \draw[line width=0.5pt].

    A very light gray is black!10. A very dark gray is black!90.

    Use pgfplots for plots. The manual is good, and most tasks have very easy and obvious solutions. A few odd things are obscure. E.g., adding a zero-line to a plot.

    When supplying images to accompany articles, depending on the journal, the TikZ format may not be acceptable. Fortunately, it is easy to create standalone PDFs from TikZ figures. Use the standalone documentclass.

    % myfig.tex
    \documentclass[tikz]{standalone} %standalone figure
    \begin{document}
    \begin{tikzpicture}
      \draw (0,0) -| (5,5) -| (10,10); %tightly cropped!
    \end{tikzpicture}
    \end{document}

    LuaTeX hints

    See the LuaTeX manual.

    Modern TeX distributions include LuaTeX. The first thing most new users will wish to attemp with LuaTeX is compilation of legacy LaTeX documents. You can compile a LaTeX document named mydoc.tex with the command lualatex mydoc.

    Unicode hints

    To enter arbitrary Unicode characters on a Windows platform, see http://www.fileformat.info/tip/microsoft/enter_unicode.htm. On Linux, consider the IBus input bus. If you use Vim on either platform, see help utf-8-typing (and help digraphs-default).

    Windows 11 hints

    To see your recent files, open the Run Dialog Box (keyboard shortcut Windows Key+R) and enter shell:recent. You can open (or delete) files here.

    To search for a phrase in a given type of file in FileExplorer, use the search bar on the upper right hand corner with the type: and content: prefixes. E.g., content:"my phrase" type:.tex. (First, make sure you are indexing the contents.)

    Google Drive hints

    It is possible to provide a direct download link for items on your Google drive by making a small change in the URL. Here is an example for a Google spreadsheet. In a browser, open the file to edit and you’ll see an address like https://docs.google.com/spreadsheets/d/ID/edit, where the ID will be specific to your document. Just change the end of this to specify export and a format argument. For example, https://docs.google.com/spreadsheets/d/ID/export?format=xlsx.

    GnuWin32 hints

    GnuWin32 includes many useful GNU applications, including grep, sed, and awk. If you download everything (recommended), it will take a while. If you are just looking for a grep implementation, you can try grepwin. (License: GPL)

    Installation

    (with thanks to Arturo Servin) and the GetGnuWin32 developers.

    • Download the getgnuwin32 project maintenance utility. (This will download and install the tools for you.)
    • Run the executable file you downloaded. It will ask you for a destination to decompress the file. This will be a temporary directory: you will eventually delete it. I will assume you use c:. (You can choose whatever you want.) To install, you can just follow the instructions. (If you want details you can check the readme file included with the package.)
    • Comment: If you are behind a proxy, you may have to configure wget (using bin.ini).
    • Run download.bat. (This file is well documented. If you wish to change the defaults—e.g., the default mirror site for download—edit the file before running it, and save your changes.) As it runs, download.bat will download the applications packages. This can take a while.
    • When dowload.bat finishes running, run install.bat. (This will decompress the downloaded packages.)
    • Copy the folder getgnuwin32 to a new folder C:. (Or anywhere else you want.)
    • Change to your newly filled C: folder and run the file update-links.bat. This should complete the installation process (by updating any orphan links). You are now ready to use your new tools.
    Optionally:
    • Copy the Start Menu folder (which you will find inside your gnuwin32 folder) to the Start Menu of your windows desktop. When executed the shortcuts inside will automatically start a cmd in the path of gnuwin32.
    • Add environmental variables as recommended in the GnuWin32 docs. (Recommended.)
    • Add the full path to your gnuwin32folder to your PATH.
    • Delete your temp folder. You do not need it any more.

    There are more options. I do not use them and they can confuse some windows applications using the same name as those in the gnu package, so I will not explain. If you are interested, check the readme file.


    Adobe, PostScript, and Acrobat are registered trademarks of Adobe Systems, Incorporated. Apple and Macintosh are registered trademarks of Apple Computer, Incorporated. Windows and MS-DOS are trademarks of Microsoft Corporation.

    Copyright © 1998–2026 by Alan G. Isaac Some Rights Reserved:

    The content on this page is subject to the Creative Commons Attribution License version 2.0