Monday, April 11, 2005

Physics 20 Reading List #3

This week you have readings about good graphing practice, about the practicalities of working with emacs and with three graphing applications (gnuplot, xmgrace, and Mathematica; pick one), and about Python's history and style. In separate blog posts, I am giving you links to Python and Unix manuals and tutorials.

Here we go.

1. Beautiful graphing according to Tufte

I'm giving you (as a handout) an excerpt of E. R. Tufte's book, The Visual Display of Quantitative Information, which we have in the lab. Most of Tufte's book is summarized in J. P. Boyd's The Gospel According to Tufte, a chapter of a future (very promising) book (here are the other chapters). Even this summary is a bit long, so for the purpose of this week's assignment I would like you to concentrate on Secs. 2.1 (the five laws) and 2.4 (small multiples). How can you apply these principles to the graphs you will be producing for this week's assignment?

2. Emacs

The best emacs tutorial comes with the program itself (just type 'CTRL-h' and then 't'). But see also the emacs wiki, and this tutorial. We have also a good emacs book in the physlab library, Learning GNU Emacs, by D. Cameron, B. Rosenblatt, E. S. Raymond (O'Reilly, Sebastopol, CA, 1996). Some prefer xemacs (touted as "The next generation of emacs"), you might check it out.

3. Graphing

For the purposes of this lab, I am suggesting three graphing tools, which have rather different philosophies. You should have a look at all of them, and see which of them can best suit your style. The first, gnuplot, is a classic tool with a pedigree, but is somewhat oldfashioned in its interface, which requires you to input commands at a prompt, or write command scripts (a useful feature, in that you can easily automate the generation of a set of similar graphs). The second, xmgrace, has a more intuitive point-and-click/manu interface; although it does not look very refined, it is actually rather powerful, with lots of functions. The third tool is just our beloved Mathematica, which has a full range of graphing capabilities, and which allows access to unparalleled data-processing power and breadth (Mathematica will also let you program graphics at a very low level, allowing very flexible and customized plots).

3a. Graphing with gnuplot

Don't waste time with the gnuplot manual, whose logic is counterintuitive at the best. See instead this tutorial from IBM; for tricks (which will be become necessary almost immediately; such is the nature of the tool), see this (Not so) FAQ.

3b. Graphing with xmgrace

This is a good tool, but its documentation is subpar. Still, see the tutorial and the user's guide at the Grace homepage.

3c. Graphing with Mathematica

The chief tool to plot data with Mathematica is ListPlot[]; the entire section 1.9 of the manual is also relevant. Mathematica can be a very powerful environment for graphics programming, where you write code to map your data structures directly into graphics primitives. We will discuss this more, but you can start looking at section 2.10 of the manual.

4. Python's history and style

In a separate posting you can find links to Python manuals and tutorials, which should be useful throughout the duration of the lab. This week I'm asking you to read two short book prefaces (here and here) by Python creator Guido van Rossum, who talks about the history and development of the language.

You should also start reading the Python style guide for guidance on writing your programs. Some of this will refer to Python constructs that you don't know yet, so you should return to the style guide occasionally.

0 Comments:

Post a Comment

<< Home