only check kw is at least as long as group

This commit is contained in:
Pietro Vertechi 2017-08-21 15:53:31 +01:00
parent 9529246bfb
commit 6dba32bf99

View File

@ -511,13 +511,13 @@ end
# split the group into 1 series per group, and set the label and idxfilter for each
@recipe function f(groupby::GroupBy, args...)
lengthGroup = maximum(union(groupby.groupIds...))
for (i,glab) in enumerate(groupby.groupLabels)
@series begin
label --> string(glab)
idxfilter --> groupby.groupIds[i]
for (key,val) in d
length(args) == 0 && break
if key != :group && isa(val, AbstractArray) && size(val,1) == size(args[1],1)
if key != :group && isa(val, AbstractArray) && size(val,1) >= lengthGroup
n = ndims(val)
:($key) := val[groupby.groupIds[i], fill(Colon(), n-1)...]
end