=== The Plot Window Disappears Quickly ===

Depending on the backend used for plotting with Easyviz, the plot
window may be killed when the program terminates. Adding a statement
that makes the program halt provides a remedy:
!bc cod
raw_input('Press Return key to quit: ')
!ec
The plot window will now stay on the screen until hitting the Enter/Return key.


=== Old Programs with 2D Scalar/Vector Field Plotting Do Not Work ===

SciTools version 0.7 changed the default backend for plotting to
Matplotlib instead of Gnuplot. Some functionality in Gnuplot, especially
regarding 2D vector/scalar fields, is not yet present in Matplotlib.
You then need to explicitly run the script with Gnuplot as plottin
engine:
!bc
python myprogram.py --SCITOOLS_easyviz_backend gnuplot
!ec
or you must import gnuplot explicitly in the program:
!bc
from scitools.std import *
from scitools.easyviz.gnuplot_ import *
!ec
or you can edit the *installed* `scitools.cfg` file ("backend" keyword
in the "easyviz" section), or maybe the simplest solution is to reinstall
SciTools with Gnuplot as plotting engine:
!bc
python setup.py install --easyviz_backend gnuplot
!ec


=== Can I Easily Turn Off All Plotting? ===

Yes, this is very convenient when debugging other (non-plotting) parts
of a program. Just write
!bc
from scitools.std import *
turn_off_plotting(globals())
!ec


=== Check Your Backends! ===

When you encounter a problem with Easyviz plotting, make sure that the
backend works correctly on its own (there may, e.g., be installation
problems with the backend - Easyviz just calls the backend to do the
plotting). 

__Gnuplot.__
For the Gnuplot backend you can try the following commands in a
terminal window:
!bc rpy
Unix/DOS> gnuplot
gnuplot> plot sin(x)
!ec
This should result in a plot of the sine function on the screen.
If this command does not work, Easyviz will not work with the Gnuplot
backend. A common problem is that Gnuplot is installed, but the path
to the Gnuplot executable is not registered in the `PATH` environment
variable. See the section *Installing Gnuplot* if you need help with 
installing the Gnuplot program and its Python interface.

__Matplotlib.__
The following code tests if you have installed Matplotlib correctly:
!bc
import matplotlib.pyplot as plt
import numpy
x = numpy.linspace(0, 2*numpy.pi, 101)
y = numpy.sin(x)
plt.plot(x, y)
plt.show()
raw_input('Press Enter: ')  # wait, otherwise the plot window disappears
!ec
In case of problems, go to the Matplotlib source directory, remove the
`build` subdirectory, and try a new install with `python setup.py install`.

=== Trouble with Movie Making ===

The call to `movie` demands that you have video encoders installed.
The legal encoders are `mencoder`, `ffmpeg`, `mpeg_encode`, `ppmtompeg`,
`mpeg2enc`, and `convert`. Some of these also require additional
software to be installed.

To install (e.g.) `convert`, you need to install the ImageMagick
software suite, since `convert` is a part of that package. ImageMagick
is easy to install on most platforms. The `ppmtompeg` encoder is a part
of the Netpbm software, while `mpeg2enc` is a part of `mjpegtools`.

On Linux Ubuntu you can issue the following installation command to install most of the available encoders for the `movie` function:
!bc
Unix> sudo apt-get install mencoder ffmpeg libavcodec-unstripped-51 netpbm mjpegtools imagemagick
!ec

When something goes wrong with the movie making, check the output in
the terminal window. By default, Easyviz prints the command that makes
the movie. You can manually copy this command and run it again to start
finding out what can be wrong. Just switching to a different encoder can be
a quick remedy. The switch is done with the `encoder` keyword argument
to `movie`, e.g.,
!bc
# make animated GIF movie in the file tmpmovie.gif:
movie('tmp_*.png', encoder='convert', fps=2,
      output_file='tmpmovie.gif')
!ec

