-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more _repr_*_
#1136
Comments
Does it not work to use the .. graphviz:: ../_static/diagrams/git_setup.dot which renders automatically as the "schematic of recommended setup" on this page https://mne.tools/dev/install/contributing.html#forking-the-mne-python-repository ... but I confess I don't think we've ever tried it in a SG-processed example. |
I take that back. We have done it inside a SG-processed example: resulting image is at the end of this tutorial section |
Nice! I'm guessing they'd rather have an automatic detection/embedding rather than having to add directives to their docs, though. If Jupyter supports |
@drammock one can for sure do that, but then it is either saving as a file or adding content of the dot-file to the rst. I've done that in https://da.gitlab-pages.liu.se/B-ASIC/examples/firstorderiirfilter.html#sphx-glr-examples-firstorderiirfilter-py and it works well, but doesn't benefit from any updates and is not as "fluent" as when showing plots. I've also used jupyter-sphinx with a good result: https://da.gitlab-pages.liu.se/B-ASIC/examples/connectmultiplesfgs.html but then the drawback is that I have to write a Python-docstring which contains embedded Python code, so it cannot easily be executed. (I may miss something here, I can admit, probably it is possible to write it as rst directly, rather than python -> rst -> python). @larsoner I think Jupyter does. At least Spyder supports it (so qtconsole). Ipython supports a bunch of formats https://ipython.readthedocs.io/en/stable/config/integrating.html#rich-display I'll give it a go, but not sure about the time plan (I'd like to do it soon, but should do other things). Nor if I can do it, but I agree from a quick look that it appears to not require that many lines. Just need to understand a bit more of the architecture. |
ah, OK, I somehow missed the point that the GraphViz source is being generated at runtime |
Context: I'm looking for a way to include GraphViz-(run-time)-generated in examples.
One way would be to enable capturing
_repr_png_
and possibly_repr_svg_
. Is it likely that you will accept a PR for this?Slightly related: #1134 (as these may also be embedded rather than storing as separate files) xflr6/graphviz#199 (if graphviz includes
_repr_html_
it would also enable it)The text was updated successfully, but these errors were encountered: