moved group_as_matrix to Plots

This commit is contained in:
Pietro Vertechi 2017-09-04 09:48:49 +01:00
parent 6c548f025e
commit e2795341d9

View File

@ -516,10 +516,12 @@ splittable_kw(key, val::Tuple, lengthGroup) = all(splittable_kw.(key, val, lengt
split_kw(key, val::AbstractArray, indices) = val[indices, fill(Colon(), ndims(val)-1)...] split_kw(key, val::AbstractArray, indices) = val[indices, fill(Colon(), ndims(val)-1)...]
split_kw(key, val::Tuple, indices) = Tuple(split_kw(key, v, indices) for v in val) split_kw(key, val::Tuple, indices) = Tuple(split_kw(key, v, indices) for v in val)
group_as_matrix(t) = false
# split the group into 1 series per group, and set the label and idxfilter for each # split the group into 1 series per group, and set the label and idxfilter for each
@recipe function f(groupby::GroupBy, args...) @recipe function f(groupby::GroupBy, args...)
lengthGroup = maximum(union(groupby.groupIds...)) lengthGroup = maximum(union(groupby.groupIds...))
if !(RecipesBase.group_as_matrix(args[1])) if !(group_as_matrix(args[1]))
for (i,glab) in enumerate(groupby.groupLabels) for (i,glab) in enumerate(groupby.groupLabels)
@series begin @series begin
label --> string(glab) label --> string(glab)