To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.
plt.stackplot with non-default 'baseline' keyword option not working for integer input.
I wanted to use plt.stackplot with the baseline='sym' option, and noticed that it a TypeError with my data. Turned out it was just a matter of changin the input valued to float types, but it should work for integer arrays too.
Code for reproduction
return np.random.randint(5, 50, 10)
x = np.arange(10)
y1, y2, y3 = fnx(), fnx(), fnx()
fig, ax = plt.subplots()
ax.stackplot(x, y1, y2, y3, baseline="sym")
TypeError: Cannot cast ufunc add output from dtype('float64') to dtype('int64') with casting rule 'same_kind'
This nice figure:
Python version 2.7.12
Platform OSX Version 10.12
wait, pylab has it's own version?!
That looks more like a NumPy version to me; probably it imports it with the *-import.
Oh, that makes sense. I miss-read it is '1.1.3' which might have actually been an mpl version.
closed by #7827