Skip to content

Commit

Permalink
Merge pull request #17 from JuliaRobotics/maintenance/4Q19/fixplotkde
Browse files Browse the repository at this point in the history
fix plotkde vector legend and colors
  • Loading branch information
dehann committed Oct 9, 2019
2 parents 639f3c0 + c452bda commit 1f2ed6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/KernelDensityEstimatePlotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ function plotKDE(darr::Array{BallTreeDensity,1};
#
# defaults
defaultcolor = false
if c==nothing
c, defaultcolor = getColorsByLength(length(darr)), true
if c==nothing || length(c) != length(darr)
c = getColorsByLength(length(darr))
defaultcolor = true
end
# c = (length(c)>=2) ? c : repeat(c,length(darr))
lg = (legend == nothing) ? nothing : Guide.manual_color_key("Legend", legend, c)
Expand Down

0 comments on commit 1f2ed6b

Please sign in to comment.