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
|
end
|
||||||
|
|
||||||
# should be a RGB now... either it was passed in, generated automatically, or created from a string
|
# 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
|
# return the RGB
|
||||||
c
|
c
|
||||||
|
|||||||
@ -135,6 +135,16 @@ function addGadflySeries!(gplt, d::Dict)
|
|||||||
# add the Geoms
|
# add the Geoms
|
||||||
append!(gfargs, getLineGeoms(d))
|
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
|
# handle markers
|
||||||
geoms, guides = getMarkerGeomsAndGuides(d)
|
geoms, guides = getMarkerGeomsAndGuides(d)
|
||||||
append!(gfargs, geoms)
|
append!(gfargs, geoms)
|
||||||
|
|||||||
@ -104,7 +104,8 @@ function sticksHack(; kw...)
|
|||||||
dLine, dScatter
|
dLine, dScatter
|
||||||
end
|
end
|
||||||
|
|
||||||
|
makevec(v::AVec) = v
|
||||||
|
makevec{T}(v::T) = T[v]
|
||||||
|
|
||||||
|
|
||||||
function regressionXY(x, y)
|
function regressionXY(x, y)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user