FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Sphinx plot extension source/build directory issues · Issue #157 · matplotlib/matplotlib · GitHub

Repository navigation

Sphinx plot extension source/build directory issues #157

Closed

Description

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:

  1. 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.

  2. 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.

Activity

  1. pelson commented on Jun 18, 2012

    Member

    Similar to #190 (although may be a different issue).

  2. efiring commented on May 29, 2013

    Member

    From the sourceforge comment, it sounds like this might be working; in any case, it is peripheral and inactive, so I am closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL