gadfly color group
This commit is contained in:
parent
6f1ef82e89
commit
730d764c6e
File diff suppressed because one or more lines are too long
@ -231,6 +231,7 @@ end
|
||||
# update the defaults globally
|
||||
|
||||
function plotDefault(k::Symbol)
|
||||
k = get(_keyAliases, k, k)
|
||||
if haskey(_seriesDefaults, k)
|
||||
return _seriesDefaults[k]
|
||||
elseif haskey(_plotDefaults, k)
|
||||
@ -241,6 +242,7 @@ function plotDefault(k::Symbol)
|
||||
end
|
||||
|
||||
function plotDefault!(k::Symbol, v)
|
||||
k = get(_keyAliases, k, k)
|
||||
if haskey(_seriesDefaults, k)
|
||||
_seriesDefaults[k] = v
|
||||
elseif haskey(_plotDefaults, k)
|
||||
@ -250,6 +252,12 @@ function plotDefault!(k::Symbol, v)
|
||||
end
|
||||
end
|
||||
|
||||
function plotDefault!(; kw...)
|
||||
for (k,v) in kw
|
||||
plotDefault!(k, v)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@ -171,8 +171,9 @@ function addGadflySeries!(gplt, d::Dict, initargs::Dict)
|
||||
# then the vector passed to the "color" keyword should be a vector: [1,1,2,2,3,3,4,4, ..., i,i, ... , n,n]
|
||||
csindices = Int[mod1(i,length(d[:color])) for i in 1:length(d[:y])]
|
||||
cs = collect(repmat(csindices', 2, 1))[1:end-1]
|
||||
grp = collect(repmat((1:length(d[:y]))', 2, 1))[1:end-1]
|
||||
d[:x], d[:y] = map(createSegments, (d[:x], d[:y]))
|
||||
colorgroup = [(:color, cs)]
|
||||
colorgroup = [(:color, cs), (:group, grp)]
|
||||
else
|
||||
colorgroup = []
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user