docxbuilder icon indicating copy to clipboard operation
docxbuilder copied to clipboard

Images are not shown with matplotlib.sphinxext.plot_directive

Open olebole opened this issue 2 years ago • 2 comments

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.

olebole avatar Jun 22 '23 08:06 olebole

Could you solve this issue by yourslef?

cobhc999 avatar Oct 15 '24 04:10 cobhc999

Unfortunately not.

olebole avatar Oct 16 '24 08:10 olebole