Change color handling of error recipes (#2675)

* fix iteration of segments

* fix error vector arg detection

* change color handling of recipes
This commit is contained in:
Simon Christ 2020-05-06 18:21:54 +02:00 committed by GitHub
parent 6ddf31d465
commit 3d693d88e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -71,8 +71,9 @@ const POTENTIAL_VECTOR_ARGUMENTS = [
:marker_z,
:markerstrokecolor,
:markerstrokealpha,
:xerror,
:yerror,
:yerror,
:zerror,
:series_annotations,
:fillrange,
]
@ -1027,7 +1028,7 @@ end
function error_style!(plotattributes::AKW)
plotattributes[:seriestype] = :path
plotattributes[:linecolor] = plotattributes[:markerstrokecolor]
plotattributes[:markercolor] = plotattributes[:markerstrokecolor]
plotattributes[:linewidth] = plotattributes[:markerstrokewidth]
plotattributes[:label] = ""
end

View File

@ -74,9 +74,13 @@ function iter_segments(series::Series)
elseif has_attribute_segments(series)
if series[:seriestype] in (:scatter, :scatter3d)
return [[i] for i in eachindex(y)]
else
if any(isnan,y)
return [iter_segments(y)...]
else
return [i:(i + 1) for i in firstindex(y):lastindex(y)-1]
end
end
else
segs = UnitRange{Int}[]
args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y)