8000 plot_directive: Avoid warning if plot_formats doesn't contain 'png' · matplotlib/matplotlib@db2a3b5 · GitHub
[go: up one dir, main page]

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 db2a3b5

Browse files
committed
plot_directive: Avoid warning if plot_formats doesn't contain 'png'
1 parent 22bbbae commit db2a3b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,13 @@ def remove_coding(text):
419419
{{ only_texinfo }}
420420
421421
{% for img in images %}
422+
{% if 'png' in img.formats -%}
422423
.. image:: {{ build_dir }}/{{ img.basename }}.png
423424
{% for option in options -%}
424425
{{ option }}
425426
{% endfor %}
426427
428+
{% endif -%}
427429
{% endfor %}
428430
429431
"""

0 commit comments

Comments
 (0)
0