Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e4da584

Browse filesBrowse files
authored
Merge pull request #6327 from jarrodmillman/latex_figure_caption
Fix: captions for plot directive in latex target
2 parents a63463f + 9664046 commit e4da584
Copy full SHA for e4da584

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/sphinxext/plot_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/plot_directive.py
+6-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.