8000 Merge pull request #2753 from tacaswell/plot_directive_py3k · matplotlib/matplotlib@7759dc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7759dc6

Browse files
committed
Merge pull request #2753 from tacaswell/plot_directive_py3k
BUG : fixes py3k import
2 parents 157eec9 + 3493345 commit 7759dc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,8 @@ def _dummy_print(*arg, **kwarg):
534534
ns = {}
535535
if not ns:
536536
if setup.config.plot_pre_code is None:
537-
six.exec_("import numpy as np\nfrom matplotlib import pyplot as plt\n", ns)
537+
six.exec_(six.text_type("import numpy as np\n" +
538+
"from matplotlib import pyplot as plt\n"), ns)
538539
else:
539540
six.exec_(six.text_type(setup.config.plot_pre_code), ns)
540541
ns['print'] = _dummy_print

0 commit comments

Comments
 (0)
0