Merge pull request #1565 from daschw/fillrange
Fix fillrange with line segments on PyPlot and Plotly (fix #1563)
This commit is contained in:
commit
026e894e1d
@ -332,7 +332,7 @@ function plotly_layout(plt::Plot)
|
|||||||
|
|
||||||
for sp in plt.subplots
|
for sp in plt.subplots
|
||||||
spidx = multiple_subplots ? sp[:subplot_index] : ""
|
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,
|
# add an annotation for the title... positioned horizontally relative to plotarea,
|
||||||
# but vertically just below the top of the subplot bounding box
|
# but vertically just below the top of the subplot bounding box
|
||||||
if sp[:title] != ""
|
if sp[:title] != ""
|
||||||
@ -805,7 +805,7 @@ function plotly_series_segments(series::Series, d_base::KW, x, y, z)
|
|||||||
series[:fillrange] = (f1, f2)
|
series[:fillrange] = (f1, f2)
|
||||||
end
|
end
|
||||||
if isa(series[:fillrange], AbstractVector)
|
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, :fill)
|
||||||
delete!(d_out_fillrange, :fillcolor)
|
delete!(d_out_fillrange, :fillcolor)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -837,9 +837,9 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
end
|
end
|
||||||
n = length(dim1)
|
n = length(dim1)
|
||||||
args = if typeof(fillrange) <: Union{Real, AVec}
|
args = if typeof(fillrange) <: Union{Real, AVec}
|
||||||
dim1, expand_data(fillrange, n), dim2
|
dim1, _cycle(fillrange, rng), dim2
|
||||||
elseif is_2tuple(fillrange)
|
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
|
end
|
||||||
|
|
||||||
handle = ax[f](args..., trues(n), false, py_fillstepstyle(st);
|
handle = ax[f](args..., trues(n), false, py_fillstepstyle(st);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user