I use matplotlib in a Django application, through apache in Mac OS X 10.7.5, but I cannot get it to draw a figure for me. I imported import matplotlib.pyplot as plt, and the line in my view,
plt.plot(x, y)
( xand yare numpy arrays) throws an error
2013-01-23 16:39:16.731 httpd[381:203] The application with bundle ID (null) is running setugid(), which is not allowed.
in my apache error_log. I'm afraid I don’t know what it is setugid(), or how to make it possible for my application. Mine is $MPLCONFIGDIRinstalled in /tmp/.mplconfigand apache, as user _www wrote a couple of empty directories, so it seems to be working fine. Can someone give me a hint?
Update: if i
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
and adjust the shape, subtitle and axis (whole caboodle), I can savefig () without errors ... what additional permissions do I need to use pyplot?
source
share