I've written my first python script with matplotlib, which works fine at the
command line but not with cron. It's quite puzzling to me, and probably
involves some path declaration that I don't know about.
#plot data from automate.csv
import matplotlib
import datetime
import numpy
from matplotli
Does this code work for anyone else?
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
n = 10
x = np.random.standard_normal(n)
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
plt.hexbin(x,y, cmap
Hello Paul,
On Thu, Jun 25, 2009 at 19:13, Paul Simon wrote:
> I've written my first python script with matplotlib, which works fine at the
> command line but not with cron. It's quite puzzling to me, and probably
> involves some path declaration that I don't know about.
I may have read the mail
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
--- Begin Message ---
You'll want to use the Agg backend, since the GtkAgg backend will try to
open a window (which isn't generally possible from a cron
Hi Sandro,
There is no image output when the script is run from cron. I think that is
what you are asking.
I thought about updating matplotlib but at this point don't want to change
versions unless all else fails. I"m running Mandriva 2008.1 and it's a lot
of work.
Is there a more detailed w
Paul Simon wrote:
I've written my first python script with matplotlib, which works fine at
the command line but not with cron. It's quite puzzling to me, and
probably involves some path declaration that I don't know about.
#plot data from automate.csv
import matplotlib
Right here you shoul
Paul
Eric's attachment was missing.
This is the crontab we use, which he described:
- we use bash
- the file config/bash_env has most of what is usually in .bashrc;
for cron we source it, for shell we source it in .bashrc
- "daily.py --use_defaults" is the command that we want to run
- do
How do you show the legend below the graph, so it doesn't overlap at
all with the graph? The docs for the legend() "loc" parameter only
seem to specify where *on* the graph you want it to show, which is
driving me nuts because even using "best", it usually hides some of my
data.
I want to see *all
The linked page below shows how you put the legend above the graph.
http://matplotlib.sourceforge.net/users/plotting/legend.html#legend-location
You can put it below the axes by adjusting the bbox_to_anchor parameter.
Try something like
bbox_to_anchor=(0., -0.1, 1., -0.1), loc=1
Make sure to a