added fillto for gadfly/immerse

This commit is contained in:
Thomas Breloff 2015-09-19 17:23:18 -04:00
parent ff6e83c55e
commit c20a7b3c69
3 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -135,6 +135,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)
append!(gfargs, geoms)

View File

@ -104,7 +104,8 @@ function sticksHack(; kw...)
dLine, dScatter
end
makevec(v::AVec) = v
makevec{T}(v::T) = T[v]
function regressionXY(x, y)