# How to create a patch/shape with a color gradient in a simple 2d plot?

**URL:** <https://discourse.julialang.org/t/how-to-create-a-patch-shape-with-a-color-gradient-in-a-simple-2d-plot/62607>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [June 9, 2021, 6:15am UTC](https://discourse.julialang.org/t/how-to-create-a-patch-shape-with-a-color-gradient-in-a-simple-2d-plot/62607 "2021-06-09T06:15:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 9, 2021, 6:58am UTC](https://discourse.julialang.org/t/how-to-create-a-patch-shape-with-a-color-gradient-in-a-simple-2d-plot/62607/2 "2021-06-09T06:58:07Z")

</div>

Have you checked this [post](https://discourse.julialang.org/t/can-i-paint-the-background-of-a-plot/) with a beautiful solution by @klaff using Plots, Colors and PolygonOps?

_NB: please post your code above inside triple backticks_

---

_[View the full topic](https://discourse.julialang.org/t/how-to-create-a-patch-shape-with-a-color-gradient-in-a-simple-2d-plot/62607)._
