Matplotlib running under cron

john.bacon@...2566... writes:

I recently changed some of the colours, using tuples of RGB values instead
of the standard colors and now the scripts will run from the command line,
but not as scheduled cron jobs and I get the following error:

Unable to access the X Display, is $DISPLAY set properly?

This has probably nothing to do with the way you specify colors. For
some reason matplotlib is using an interactive backend. Make sure that
your script starts with

import matplotlib
matplotlib.use('Agg')

or that you specify the Agg backend in your matplotlibrc file.

···

--
Jouni K. Sepp�nen
http://www.iki.fi/jks