# Plotting Series of Shapes

**URL:** <https://discourse.julialang.org/t/plotting-series-of-shapes/60108>\
**Category:** New to Julia\
**Tags:** plotting, plots\
**Created:** [April 27, 2021, 2:14pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108 "2021-04-27T14:14:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmit/32/12443_2.png) [@bmit](https://discourse.julialang.org/u/bmit)\
**Post date:** [April 27, 2021, 2:14pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/1 "2021-04-27T14:14:52Z")

</div>

I’d like to plot a series of shapes. I create a vector of shape objects and plot directly. Unlike other series types, each shape is plotted with a different color by default. My hope is that they would all be the same color since they are the same series. How can I fix this without simply specifying the color directly?

```julia
ang = range(0, 2π, length = 60)
ellipse(x, y, w, h) = Shape(w*sin.(ang).+x, h*cos.(ang).+y)
myshapes = [ellipse(x,rand(),rand(),rand()) for x = 1:4]
plot(myshapes)

```

![ellipse](https://global.discourse-cdn.com/julialang/original/3X/4/7/47d9fba18bfcc4ab0f83af915472a52dc6c23c71.png)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 27, 2021, 5:13pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/2 "2021-04-27T17:13:42Z")

</div>

Whatever the fix might be, it will certainly not be as simple as simply specifying the color directly…

---

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [April 27, 2021, 5:54pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/3 "2021-04-27T17:54:55Z")

</div>

It could be a recent bug: I used to get a single series with all shapes in blue, but after updating Plots and GR I get multiple series (in different colors as expected).

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [April 27, 2021, 5:55pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/4 "2021-04-27T17:55:46Z")

</div>

Changing your last line to …

```julia
plot(myshapes,fc=:cornflowerblue)

```

[`fc` = `fillcolor`] leads to:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/4/84f178b717fb7196aa2b929cf1a8f68933379c2b.png)  
Is that what you want?

---

<div class="post-metadata">

**Author:** ![bmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmit/32/12443_2.png) [@bmit](https://discourse.julialang.org/u/bmit)\
**Post date:** [April 27, 2021, 6:10pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/5 "2021-04-27T18:10:16Z")

</div>

I was pretty sure I used to get all one color too.

---

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [April 27, 2021, 6:10pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/6 "2021-04-27T18:10:57Z")

</div>

It loos like the unexpected behavior was introduced in Plots 1.11.

It’s probably related to this issue: [[BUG] Unexpected behavior when plotting seriestype shape + 3x speed regression compared to 1.10.6 · Issue #3384 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/3384) @bmit you might want to add a comment there…

---

<div class="post-metadata">

**Author:** ![bmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmit/32/12443_2.png) [@bmit](https://discourse.julialang.org/u/bmit)\
**Post date:** [April 27, 2021, 6:51pm UTC](https://discourse.julialang.org/t/plotting-series-of-shapes/60108/7 "2021-04-27T18:51:27Z")

</div>

[here](https://github.com/JuliaPlots/Plots.jl/issues/3384#issuecomment-827837606)
