Merge pull request #1565 from daschw/fillrange

Fix fillrange with line segments on PyPlot and Plotly (fix #1563)
This commit is contained in:
Daniel Schwabeneder 2018-06-18 21:58:36 +02:00 committed by GitHub
commit 026e894e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -332,7 +332,7 @@ function plotly_layout(plt::Plot)
for sp in plt.subplots
spidx = multiple_subplots ? sp[:subplot_index] : ""
x_idx, y_idx = multiple_subplots ? plotly_link_indicies(plt, sp) : ("", "")
x_idx, y_idx = multiple_subplots ? plotly_link_indicies(plt, sp) : ("", "")
# add an annotation for the title... positioned horizontally relative to plotarea,
# but vertically just below the top of the subplot bounding box
if sp[:title] != ""
@ -805,7 +805,7 @@ function plotly_series_segments(series::Series, d_base::KW, x, y, z)
series[:fillrange] = (f1, f2)
end
if isa(series[:fillrange], AbstractVector)
d_out_fillrange[:y] = series[:fillrange]
d_out_fillrange[:y] = series[:fillrange][rng]
delete!(d_out_fillrange, :fill)
delete!(d_out_fillrange, :fillcolor)
else

View File

@ -837,9 +837,9 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
end
n = length(dim1)
args = if typeof(fillrange) <: Union{Real, AVec}
dim1, expand_data(fillrange, n), dim2
dim1, _cycle(fillrange, rng), dim2
elseif is_2tuple(fillrange)
dim1, expand_data(fillrange[1], n), expand_data(fillrange[2], n)
dim1, _cycle(fillrange[1], rng), _cycle(fillrange[2], rng)
end
handle = ax[f](args..., trues(n), false, py_fillstepstyle(st);