Streamplot result python version dependent #1194

pelson opened this Issue Sep 2, 2012 · 3 comments


None yet

2 participants

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)

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

pelson commented Sep 3, 2012

@tonysyu any ideas where to start looking?

pelson commented Sep 3, 2012

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

@pelson pelson closed this in 64e35f2 Sep 3, 2012
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