From 01cb0369761e9ee0a637cd29fd963d7408aac9c1 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Thu, 17 Sep 2015 11:26:26 -0400 Subject: [PATCH] added fillto support for winston --- src/backends/winston.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/backends/winston.jl b/src/backends/winston.jl index 289d5d38..8f4c3247 100644 --- a/src/backends/winston.jl +++ b/src/backends/winston.jl @@ -142,7 +142,18 @@ function plot!(::WinstonPackage, plt::Plot; kw...) Winston.add(wplt, Winston.Points(d[:x], d[:y]; copy_remove(e, :kind)...)) elseif d[:linetype] == :line - Winston.add(wplt, Winston.Curve(d[:x], d[:y]; e...)) + x, y = d[:x], d[:y] + Winston.add(wplt, Winston.Curve(x, y; e...)) + + fillto = d[:fillto] + if fillto != nothing + if isa(fillto, AbstractVector) + y2 = fillto + else + y2 = Float64[fillto for yi in y] + end + Winston.add(wplt, Winston.FillBetween(x, y, x, y2, fillcolor=d[:color])) + end elseif d[:linetype] == :scatter if d[:marker] == :none