Skip to content

Commit 947e10a

Browse files
tacaswellQuLogic
andcommitted
Be more careful about iding plt.show
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 23b5ee2 commit 947e10a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def _split_code_at_show(text, function_name):
313313
parts = []
314314
part = []
315315
for line in text.split("\n"):
316-
if (not is_doctest and line.startswith('plt.show')) or \
316+
if (not is_doctest and line.startswith('plt.show(')) or
317317
(is_doctest and line.strip() == '>>> plt.show()'):
318318
part.append(line)
319319
parts.append("\n".join(part))

0 commit comments

Comments
 (0)