# How to get rid of the straight line?

**URL:** https://discourse.julialang.org/t/how-to-get-rid-of-the-straight-line/108646
**Category:** New to Julia
**Tags:** question, plotting
**Created:** [January 10, 2024, 9:48pm UTC](https://discourse.julialang.org/t/how-to-get-rid-of-the-straight-line/108646 "2024-01-10T21:48:31Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [January 11, 2024, 1:54pm UTC](https://discourse.julialang.org/t/how-to-get-rid-of-the-straight-line/108646/4 "2024-01-11T13:54:45Z")

</div>

You still need to use `keep_idx` remove elements from x2 and y. Each element in `keep_idx` is a boolean, which will keep a value if true and will exclude a value if false. So what you need to do is index x2 and y like so:

```julia
x2 = range(0, X_inlet, length=50)
y=f.(x2)
keep_idx=Y02 .!=y
plot(-x2[keep_idx], y[keep_idx], color=:blue, label=missing)
plot!(-x2[keep_idx], -y[keep_idx], color=:blue, label=missing)
plot!(ylims=(-0.75,0.75))

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-get-rid-of-the-straight-line/108646)._
