# Incorrect colors across different series in Plots.jl

**URL:** <https://discourse.julialang.org/t/incorrect-colors-across-different-series-in-plots-jl/2017>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [February 10, 2017, 5:06am UTC](https://discourse.julialang.org/t/incorrect-colors-across-different-series-in-plots-jl/2017 "2017-02-10T05:06:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [February 10, 2017, 5:06am UTC](https://discourse.julialang.org/t/incorrect-colors-across-different-series-in-plots-jl/2017/1 "2017-02-10T05:06:07Z")

</div>

I have pushed a plot recipe for my package that produces a plot from an image that looks like this:

![](https://global.discourse-cdn.com/julialang/original/3X/a/d/adc3ec652ec0bfff4fef8a6bcf60206a8fa221ba.png)

In this recipe I tried to highlight the optimum solution in the x axis using the same color of the series. However, as you can see from the legend, the colors of the rectangular shapes in the x axis are flipped.

Can you please help me fix the issue? You can find the recipe here: [https://github.com/juliohm/ImageQuilting.jl/blob/master/src/plot\_recipes.jl#L21](https://github.com/juliohm/ImageQuilting.jl/blob/master/src/plot_recipes.jl#L21)

---

<div class="post-metadata">

**Author:** ![tbreloff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbreloff/32/68_2.png) [@tbreloff](https://discourse.julialang.org/u/tbreloff)\
**Post date:** [February 10, 2017, 11:54am UTC](https://discourse.julialang.org/t/incorrect-colors-across-different-series-in-plots-jl/2017/2 "2017-02-10T11:54:13Z")

</div>

Try swapping the primary and label lines

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [February 10, 2017, 4:42pm UTC](https://discourse.julialang.org/t/incorrect-colors-across-different-series-in-plots-jl/2017/3 "2017-02-10T16:42:54Z")

</div>

Thank you @tbreloff, problem solved.
