added fillto for gadfly/immerse
This commit is contained in:
parent
ff6e83c55e
commit
c20a7b3c69
@ -234,7 +234,8 @@ function getSeriesRGBColor(c, d::Dict, n::Int)
|
||||
end
|
||||
|
||||
# should be a RGB now... either it was passed in, generated automatically, or created from a string
|
||||
@assert isa(c, RGB)
|
||||
# @assert isa(c, RGB)
|
||||
@assert isa(c, Colorant)
|
||||
|
||||
# return the RGB
|
||||
c
|
||||
|
||||
@ -134,6 +134,16 @@ function addGadflySeries!(gplt, d::Dict)
|
||||
|
||||
# add the Geoms
|
||||
append!(gfargs, getLineGeoms(d))
|
||||
|
||||
# fillto
|
||||
if d[:fillto] != nothing
|
||||
fillto = makevec(d[:fillto])
|
||||
n = length(fillto)
|
||||
push!(d[:kwargs], (:ymin, Float64[min(y, fillto[mod1(i,n)]) for (i,y) in enumerate(d[:y])]))
|
||||
push!(d[:kwargs], (:ymax, Float64[max(y, fillto[mod1(i,n)]) for (i,y) in enumerate(d[:y])]))
|
||||
# push!(d[:kwargs], (:ymax, Float64[max(y, fillto) for y in d[:y]]))
|
||||
push!(gfargs, Gadfly.Geom.ribbon)
|
||||
end
|
||||
|
||||
# handle markers
|
||||
geoms, guides = getMarkerGeomsAndGuides(d)
|
||||
|
||||
@ -104,7 +104,8 @@ function sticksHack(; kw...)
|
||||
dLine, dScatter
|
||||
end
|
||||
|
||||
|
||||
makevec(v::AVec) = v
|
||||
makevec{T}(v::T) = T[v]
|
||||
|
||||
|
||||
function regressionXY(x, y)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user