You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the matplotlib Sphinx plot extension to add some diagrams to Sphinx documentation. However, I've come across an issue: My Sphinx documentation uses the "separate directories for source and build" option. It seems that the matplotlib plot extension doesn't work well with this option, because:
I think the "pyplot" directory should be under the "source" directory. But I had to put it one level up from the "source" directory otherwise it wouldn't be found.
When I try to build, I get error messages such as:
/home/craig-nat/MySoftware/cobs-python/doc/source/index.rst:: WARNING: image file not readable: build/pyplots/cobsr_overhead.png
It should be "../build/pyplots/cobsr_overhead.png" instead I think.
SourceForge Comments
On Sun Dec 5 16:22:05 2010, weegreenblobbie wrote:
This seems to be working in Matplotlib-1.0.0.
My Ubuntu box doesn't have 1.0.0 as a deb, so I downloaded the source an copied matplotlib-1.0.0/lib/matplotlib/sphinxext to my sphinx project.
I then updated my conf.py to use the copy:
Add any Sphinx extension module names here, as strings. They can be extensions
coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Original report at SourceForge, opened Wed Jun 16 02:16:45 2010
I'm trying to use the matplotlib Sphinx plot extension to add some diagrams to Sphinx documentation. However, I've come across an issue: My Sphinx documentation uses the "separate directories for source and build" option. It seems that the matplotlib plot extension doesn't work well with this option, because:
I think the "pyplot" directory should be under the "source" directory. But I had to put it one level up from the "source" directory otherwise it wouldn't be found.
When I try to build, I get error messages such as:
/home/craig-nat/MySoftware/cobs-python/doc/source/index.rst:: WARNING: image file not readable: build/pyplots/cobsr_overhead.png
It should be "../build/pyplots/cobsr_overhead.png" instead I think.
SourceForge Comments
On Sun Dec 5 16:22:05 2010, weegreenblobbie wrote:
This seems to be working in Matplotlib-1.0.0.
My Ubuntu box doesn't have 1.0.0 as a deb, so I downloaded the source an copied matplotlib-1.0.0/lib/matplotlib/sphinxext to my sphinx project.
I then updated my conf.py to use the copy:
Add any Sphinx extension module names here, as strings. They can be extensions
coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions =
[
'sphinxext.mathmpl',
'sphinxext.only_directives',
'sphinxext.plot_directive',
'sphinx.ext.autodoc',
'sphinx.ext.doctest'
]
And inlined plot directive work.
On Mon Jul 12 18:10:13 2010, None wrote:
I also got this bug with Sphinx 1.0b2, matplotlib 0.99.1.1
I was able to resolve it with two changes to matplotlib/sphinxext/plot_directive.py
Line 276:
from:
tmpdir = os.path.join('build', outdir)
to:
tmpdir = outdir
Line 320:
from:
for format in formats[1:]:
to:
for format in formats:
On Thu Jun 17 08:42:55 2010, cmcqueen1975 wrote:
Yes, Sphinx 1.0b2.
On Wed Jun 16 15:59:08 2010, mdboom wrote:
Which version of Sphinx? I believe you may get this message with Sphinx1.0b2.
The text was updated successfully, but these errors were encountered: