8000 Minor example updates by QuLogic · Pull Request #7559 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Minor example updates #7559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 17, 2016
Prev Previous commit
Next Next commit
Fix print_stdout example on Python 3.
  • Loading branch information
QuLogic committed Dec 11, 2016
commit e30af98ce89e606b0cc3f0dcc56469d035afba8f
6 changes: 4 additions & 2 deletions examples/pylab_examples/print_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@

plt.plot([1, 2, 3])

plt.savefig(sys.stdout)
plt.show()
if sys.version_info[0] >= 3:
plt.savefig(sys.stdout.buffer)
else:
plt.savefig(sys.stdout)
0