Skip to content

Commit 59aed70

Browse files
committed
DOC: whats new
1 parent ddc00d3 commit 59aed70

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Plot Directive now can make responsive images with "srcset"
2+
-----------------------------------------------------------
3+
4+
The plot sphinx directive (``matplotlib.sphinxext.plot_directive``, invoked in
5+
rst as ``.. plot::``) can be configured to automatically make higher res
6+
figures and add these to the the built html docs. In ``conf.py``::
7+
8+
extensions = [
9+
...
10+
'matplotlib.sphinxext.plot_directive',
11+
'matplotlib.sphinxext.figmpl_directive',
12+
...]
13+
14+
plot_srcset = '2x'
15+
16+
will make png files with double the resolution for hiDPI displays. Resulting
17+
html files will have image entries like::
18+
19+
<img src="../_images/nestedpage-index-2.png" style="" srcset="../_images/nestedpage-index-2.png, ../_images/nestedpage-index-2.2x.png 2.00x" alt="" class="plot-directive "/>

0 commit comments

Comments
 (0)