Hello,

I am running Matplotlib 0.98.6svn compiled from source on OSX and Sphinx
0.6.2. I am trying the following example to test plot_directive

.. plot::

    from numpy import linspace, sin
    import matplotlib.pylab as plt
    x = linspace(0.01,25, 10000)
    plt.plot(x, sin(x)/x)
    plt.show()

When I 'make html', I get the warning messages:

/Users/dpo/local/dev/pyorder/doc/source/pymc60.rst:: WARNING: image file not
readable: build/plot_directive/inline/2d6f2be741.png
/Users/dpo/local/dev/pyorder/doc/source/pymc60.rst:: WARNING: image file not
readable: build/plot_directive/inline/2d6f2be741.pdf

and the plot is not embedded in my html page. The links 'hires.png' and
'pdf' do point to (readable) images, though. From build/html:

$ ls -l plot_directive/inline/
total 104
-rw-r--r--  1 dpo  dpo  41347 22 Jul 20:01 2d6f2be741.hires.png
-rw-r--r--  1 dpo  dpo   7370 22 Jul 20:01 2d6f2be741.pdf

Strangely, there is no 'png' link even though my conf.py specifies

plot_formats = ['png', 'hires.png', 'pdf']

If I look at the generated html, I notice that the "img" tag wants the png,
which doesn't exist. That is one problem.

The other problem is that the "img" tag searches for the png file in
build/plot_directive/inline/, which does not exist either.

The same happens in the LaTeX output. When I 'make latex' followed by 'make
all-pdf' from build/latex, I get the error message:

LaTeX Warning: File `build/plot_directive/inline/2d6f2be741.pdf' not found
on input line 499.
!pdfTeX error: pdflatex (file build/plot_directive/inline/2d6f2be741.pdf):
cannot find image file
 ==> Fatal error occurred, no output PDF file produced!

Indeed, the image files are in plot_directive/inline/ and not in
build/plot_directive/inline/. Changing the path in the .tex solves the
problem.

Thanks in advance,
Dominique

-- 
View this message in context: 
http://www.nabble.com/Help-with-plot_directive-tp24617359p24617359.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to