Is it possible to run example code to generate an image?
Closed this issue · 1 comments
markusritschel commented
Hello,
Foremost, thanks a lot for this great extension! I was wondering if there is a way to execute example blocks in the docstrings. For example, I have one routine, which modifies input data in a certain way and the result is best seen in form of a plot. I would like to have an example as part of my docstring, e.g.
def myplotting_routine()
"""My docstring
Example
------------
>>> myplotting_routine()
"""and have the generated plot attached in the rendered documentation.
Is this possible with apidoc?
stephenfin commented
No, I'm afraid not. A quick Google suggests sphinx-exec-code might do what you're looking for but I've never used that and can't vouch for it.