Skip to content

Images are not shown with matplotlib.sphinxext.plot_directive #22

@olebole

Description

@olebole

Is this project still alive?

When I try to build docx documentation with matplotlib, the images are not included in the document. Complete example:

# docs/conf.py
project = '…'
extensions = [
    'matplotlib.sphinxext.plot_directive',
    "docxbuilder",
]
Simple matplotlib plot
----------------------

.. plot::

   import matplotlib.pyplot as plt
   plt.plot([1, 2, 3], [4, 5, 6])
   plt.title("A plotting exammple")

produces a warning:

writing... /home/oles/sphinxword/docs/index.rst:: WARNING: Failed to get filepath

The plot files are both in the build directory, and in the plot_directive subdirectory of the build directory. The HTML build works fine here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions