Skip to content

Streamplot result python version dependent #1194

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

Closed
pelson opened this issue Sep 2, 2012 · 3 comments
Closed

Streamplot result python version dependent #1194

pelson opened this issue Sep 2, 2012 · 3 comments

Comments

@pelson
Copy link
Member

pelson commented Sep 2, 2012

Both are correct, but I get different lines when running the following code on python2.7 vs python3.2:

import matplotlib.pyplot as plt
import numpy as np

x, y = np.arange(8), np.arange(10)
data = u = v = np.linspace(0, 10, 80).reshape(10, 8)
v = np.sin(v * -0.6)
plt.streamplot(x, y, u, v)
plt.savefig('sample.png')

Obviously this makes testing streamplotting quite tricky and would be nice if we could make the results consistent.

@pelson
Copy link
Member Author

pelson commented Sep 3, 2012

@tonysyu any ideas where to start looking?

@pelson
Copy link
Member Author

pelson commented Sep 3, 2012

Looks like it could be division issues. from __future__ import division seems to solve.

@pelson pelson closed this as completed in 64e35f2 Sep 3, 2012
pelson added a commit that referenced this issue Sep 3, 2012
Handled future division changes for python3 (fixes #1194).
@tonysyu
Copy link
Contributor

tonysyu commented Sep 3, 2012

Looks like you asked, debugged, and solved the problem before I even saw the issue. Thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants