# Fill under line to vertical axis in Plots.jl

**URL:** <https://discourse.julialang.org/t/fill-under-line-to-vertical-axis-in-plots-jl/70251>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [October 23, 2021, 5:58am UTC](https://discourse.julialang.org/t/fill-under-line-to-vertical-axis-in-plots-jl/70251 "2021-10-23T05:58:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![babaq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/babaq/32/891_2.png) [@babaq](https://discourse.julialang.org/u/babaq)\
**Post date:** [October 23, 2021, 5:58am UTC](https://discourse.julialang.org/t/fill-under-line-to-vertical-axis-in-plots-jl/70251/1 "2021-10-23T05:58:40Z")

</div>

anyone tried to plot a line and fill to the y axis using Plots?

similar like this:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/6/966c0740c246b4ffdc571b39e9e904625573503b.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:** [October 23, 2021, 7:16am UTC](https://discourse.julialang.org/t/fill-under-line-to-vertical-axis-in-plots-jl/70251/2 "2021-10-23T07:16:07Z")

</div>

One suggestion:

```julia
using Plots; gr()
y = 0:0.1:4
x = 1.5*(1 .+ sin.(1.5y))
xp = [-1; x; -1]
yp = [minimum(y); y; maximum(y)]
plot(xp, yp, st=:shape, fc=:blues, lw=0, xlims=(-2,4), label=false)
plot!(x,y, lc=:black, label=false)

```

![Plots_gr_vertical_curve_horizontal_fill](https://global.discourse-cdn.com/julialang/original/3X/5/6/56974ccc6777cfb8c88227daa22e6f767a43f40f.png)

---

<div class="post-metadata">

**Author:** ![babaq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/babaq/32/891_2.png) [@babaq](https://discourse.julialang.org/u/babaq)\
**Post date:** [October 23, 2021, 11:07pm UTC](https://discourse.julialang.org/t/fill-under-line-to-vertical-axis-in-plots-jl/70251/3 "2021-10-23T23:07:05Z")

</div>

It does exactly what i want, Thanks.
