Skip to content

Commit 9664046

Browse files
committed
Fix captions for plot directive in latex target
1 parent 431be66 commit 9664046

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,12 @@ def remove_coding(text):
398398
399399
{% for img in images %}
400400
{% if 'pdf' in img.formats -%}
401-
.. image:: {{ build_dir }}/{{ img.basename }}.pdf
401+
.. figure:: {{ build_dir }}/{{ img.basename }}.pdf
402+
{% for option in options -%}
403+
{{ option }}
404+
{% endfor %}
405+
406+
{{ caption }}
402407
{% endif -%}
403408
{% endfor %}
404409

0 commit comments

Comments
 (0)