Skip to content
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

docs: render figures as SVG #243

Merged
merged 2 commits into from
Mar 22, 2021
Merged

docs: render figures as SVG #243

merged 2 commits into from
Mar 22, 2021

Conversation

redeboer
Copy link
Member

@redeboer redeboer commented Mar 22, 2021

Matplotlib and graphviz output is currently rendered as PNG, despite this:

tensorwaves/docs/conf.py

Lines 172 to 184 in 7ad175f

nb_render_priority = {
"html": (
"application/vnd.jupyter.widget-view+json",
"application/javascript",
"text/html",
"image/svg+xml",
"image/png",
"image/jpeg",
"text/markdown",
"text/latex",
"text/plain",
)
}

Ideal would be to set InlineBackend.figure_formats = ['svg'] by default through some IPython configuration, see e.g. https://stackoverflow.com/a/17582607/13219025 and https://ipython.readthedocs.io/en/stable/development/config.html, but I currently can't get these settings to affect Sphinx.

@redeboer redeboer added the 📝 Docs Improvements or additions to documentation label Mar 22, 2021
@redeboer redeboer added this to the Release 0.2.1 milestone Mar 22, 2021
@redeboer redeboer self-assigned this Mar 22, 2021
@redeboer redeboer changed the title docs: create SVG plots docs: render figures as SVG Mar 22, 2021
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #243 (f8a03ff) into master (b2bb1f0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #243   +/-   ##
=======================================
  Coverage   79.31%   79.31%           
=======================================
  Files          12       12           
  Lines         585      585           
  Branches       79       79           
=======================================
  Hits          464      464           
  Misses         90       90           
  Partials       31       31           
Flag Coverage Δ
unittests 79.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@redeboer redeboer merged commit eba05ac into master Mar 22, 2021
@redeboer redeboer deleted the svg-plots branch March 22, 2021 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📝 Docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant