From 2fbc3c954ae2ecf85d1bdc6cbb2c0c585df68a59 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Tue, 16 May 2017 07:32:14 +0200 Subject: [PATCH] fix filling stepstyle on pyplot --- src/backends/pyplot.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index cf9790aa..df426bbb 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -221,6 +221,12 @@ function py_stepstyle(seriestype::Symbol) return "default" end +function py_fillstepstyle(seriestype::Symbol) + seriestype == :steppost && return "post" + seriestype == :steppre && return "pre" + return nothing +end + # # untested... return a FontProperties object from a Plots.Font # function py_font(font::Font) # pyfont.pymember("FontProperties")( @@ -868,7 +874,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series) dim1, expand_data(fillrange[1], n), expand_data(fillrange[2], n) end - handle = ax[f](args...; + handle = ax[f](args..., trues(n), false, py_fillstepstyle(st); zorder = series[:series_plotindex], facecolor = py_fillcolor(series), linewidths = 0