ordered = order
if ordered is None:
ordered = array_kind.ordinal(x)
idx = np.argsort(y)
x = np.asarray(x)
categories = pd.unique(x[idx])
return pd.Categorical(x, categories=categories, ordered=ordered)
// These are function that can be called by the user inside the aes()
After Change
...
ValueError: Lengths are not equal. len(c) is 7 and len(x) is 6.
if len(x) != len(y):
raise ValueError(
"Lengths are not equal. len(x) is {} and len(x) is {}.".format(
len(x), len(y)