On Mon, Sep 21, 2009 at 6:10 AM, kgmuller <kgmu...@gmail.com> wrote:
>
> I can't get pyreport to include matplotlib plots.
>
> My OS is Ubuntu 8.10. The pyreport version is shown as "pyreport
> 0.2.11". Python 2.5 is installed.
Do you use the python-matplotlib package from the Ubuntu repository or
have you built Matplotlib manually? And have you installed the
python-scitools package as described in the wiki [0]?
> I set the easyviz backend to matplotlib. When I run pyreport with a
> matplotlib plot and show(), I get the output:
>
> Running python script /home/kgmuller/Desktop/plot_wavepacket.py:
>
> Here goes figure plot_wavepacket_pyreport_0.png
> scitools.easyviz backend is matplotlib
>
> Outputing report to /home/kgmuller/Desktop/plot_wavepacket.html
> <string>:18: (ERROR/3) Error in "image" directive:
> no content permitted.
>
> .. image:: plot_wavepacket_pyreport_0.png
>
> scitools.easyviz backend is matplotlib
Sorry, I have never seen this error before, however, I tried the same
as you now on a clean Intrepid installation and I had no issues with
pyreport and the Matplotlib backend. Here is what I did:
First I installed python-scitools as described in [0]. Then Iinstalled
python-matplotlib from the Ubuntu repository. I also had to install
python-docutils (required by pyreport) and texlive-latex-extra. Then I
ran
SCITOOLS_easyviz_backend=matplotlib pyreport plot_wavepacket.py
where plot_wavepacket.py is given as:
from scitools.std import *
def f(x, t):
return exp(-(x-3*t)**2)*sin(3*pi*(x-t))
xmax = 4
x = linspace(-xmax, xmax, 1001)
y = f(x, 0)
plot(x, y)
show()
[0] http://code.google.com/p/scitools/wiki/Installation
Johannes