Skip to content

Commit

Permalink
Handle seriescolor option in pie plot recipe (#4208)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick4f42 authored May 25, 2022
1 parent de96717 commit ddd6d0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -982,10 +982,12 @@ end
aspect_ratio --> true
s = sum(y)
θ = 0
colors = plotattributes[:seriescolor]
for i in eachindex(y)
θ_new = θ + 2π * y[i] / s
coords = [(0.0, 0.0); partialcircle(θ, θ_new, 50)]
@series begin
seriescolor := _cycle(colors, i)
seriestype := :shape
label --> string(x[i])
x := first.(coords)
Expand Down

0 comments on commit ddd6d0a

Please sign in to comment.