### Contents

On this page, we attempt to maintain an annotated directory of the content of this blog.

## Pages

There are 6 static pages in this blog:

## Blog Posts

The list of posts, in the order in which they were published to the blog:

1. Welcome! — An introduction to the blog.

2. Making Plots for Publication — We discuss some tips and tricks for adjusting plots generated by PyPlot in order to meet the style requirements of some journals. We also provide a module that automates some of these adjustments.

3. Python Code in LaTeX — We explain how to produce Python code with syntax highlight in LaTeX documents. We also provide style files that will reproduce the appearance of code samples in A Student’s Guide to Python for Physical Modeling.

4. Interpolation — We explain the basics of interpolation (estimating the value of a function between sampled points) and describe how to use the interp1d function from the scipy.interpolate module.

5. Raising a Figure Window to the Foreground — We describe how to force a figure window to the foreground of your operating system using either the Qt or Tkinter graphics backend. (Plots created by Spyder are sometiems hard to locate.)

6. Displaying Plots Inside Loops — We explain how to display figures during the execution of a loop using PyPlot’s waitforbuttonpress() method. Python’s default behavior is to display nothing until the loop exits, regardless of how many figures you create.

7. Illuminating Surface Plots — We describe how to use the LightSource class from the matplotlib.colors module to control the illumination and shading of three-dimensional surface plots.

8. Function Arguments: *args and **kwargs — We describe positional and named arguments in Python functions, the wildcard arguments *args and **kwargs, and how to use this notation to pass arguments to funcitons.

9. Lists, Comprehensions, and Generators — We describe Python lists, a special Python construct for creating lists called a list comprehension, and a similar construct called a generator expression.

10. Speeding Up Python — Part 1: Profiling — This is the first of a two-part discussion of profiling and optimization in Python. We explain what profiling is, introduce several command-line tools for profiling Python programs, and provide some tips for effective profiling.

11. Speeding Up Python — Part 2: Optimization — This is the second of a two-part discussion of profiling and optimization in Python. We use these tools described in the previous post to demonstrate some general principles that improve the performance of Python programs.

12. Paths in Python — We discuss how you can manage the collection of directories searched by Python. This makes it simple to access modules you write or download in other Python programs.

13. Jupyter Notebooks — We introduce Jupyter notebooks with a working example. A Jupyter notebook is an interactive document that incorporates text, math, graphics, and code. This make Jupyter notebooks very useful for presenting your work or sharing it with others.

14. A Few Updates — We describe a few significant updates to Python and the Anaconda distribution of Python since the publication of the first edition of A Student’s Guide to Python for Physical Modeling in 2015. We also discuss our upcoming revised edition of the book.