Skip to content

Commit 862dc6a

Browse files
committed
DOC: SVG plots in HTML, PDF plots in LaTeX
1 parent 94b79ce commit 862dc6a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

doc/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
# Override kernel name to allow running with Python 2 on Travis-CI
4747
nbsphinx_kernel_name = 'python'
4848

49+
nbsphinx_execute_arguments = [
50+
"--InlineBackend.figure_formats={'svg', 'pdf'}",
51+
"--InlineBackend.rc={'figure.dpi': 96}",
52+
]
53+
4954
autoclass_content = 'init'
5055
autodoc_member_order = 'bysource'
5156
autodoc_default_flags = ['members', 'undoc-members']
@@ -73,7 +78,8 @@
7378
plot_include_source = True
7479
plot_html_show_source_link = False
7580
plot_html_show_formats = False
76-
plot_pre_code = ""
81+
plot_pre_code = ''
82+
plot_formats = ['svg', 'pdf']
7783

7884
# Add any paths that contain templates here, relative to this directory.
7985
templates_path = ['_template']
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# See https://nbviewer.jupyter.org/github/mgeier/python-audio/blob/master/plotting/matplotlib-inline-defaults.ipynb
2+
3+
c.InlineBackend.figure_formats = {'svg'}
4+
c.InlineBackend.rc = {'figure.dpi': 96}

0 commit comments

Comments
 (0)