You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Categorical not hitting update path on fill_between #9494
/projects/matplotlib/lib/matplotlib/artist.py in convert_yunits(self, y)
198 if ax is None or ax.yaxis is None:
199 return y
--> 200 return ax.yaxis.convert_units(y)
201
202 @property
~/projects/matplotlib/lib/matplotlib/axis.py in convert_units(self, x)
1489 return x
1490
-> 1491 ret = self.converter.convert(x, self.units, self)
1492 return ret
1493
This seems to be limited to categoricals because dates work as expected:
import numpy as np
import pandas as pd
dates = pd.date_range('1990-10-10', '2004-10-10', freq='M')
x = np.arange(84)
y1 = dates[:84]
y2 = dates[84:]
plt.fill_between(x, y2, y1)
And as @anntzer suggested, the axis behavior should be modified such that once units are set on that axis, the axis should error out if new input isn't in the same units. As expected, the following errors out: plt.fill_between(x, x, y1)
changed the title [-]Categorical Y2 not hitting update path on fill_between[/-][+]Categorical not hitting update path on fill_between[/+]on Oct 20, 2017
Activity
[-]Categorical Y2 not hitting update path on fill_between[/-][+]Categorical not hitting update path on fill_between[/+]jklymak commentedon Nov 6, 2017
#9705 fixes this....

dstansby commentedon Nov 7, 2017
Fixed by #9705