# Plots How to get exact point of intersection of a plot with axis?

**URL:** <https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304>\
**Category:** General Usage\
**Tags:** plotting, gr, gaston\
**Created:** [March 21, 2020, 4:05pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304 "2020-03-21T16:05:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 21, 2020, 4:05pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304/1 "2020-03-21T16:05:46Z")

</div>

Plots How to get exact point of intersection of a plot with axis ?

```julia
x=range(0,stop=2pi,length=365)
plot!(sin.(x))

```

x is intersecting with y at -1 , I expect on 0 level  
Paul

---

<div class="post-metadata">

**Author:** ![misha\_mikhasenko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/misha_mikhasenko/32/5060_2.png) [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Post date:** [March 21, 2020, 4:19pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304/2 "2020-03-21T16:19:18Z")

</div>

```julia
plot(x, sin.(x))

```

Not sure if I fully understood the question, tho.

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 21, 2020, 5:36pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304/3 "2020-03-21T17:36:23Z")

</div>

> [@programista](#):
>
> Plots How to get exact point of intersection of a plot with axis ?
> 
> ```julia
> x=range(0,stop=2pi,length=365)
> plot!(sin.(x))
> 
> ```
> 
> x is intersecting with y at -1 , I expect on 0 level  
> Paul

![cos](https://global.discourse-cdn.com/julialang/original/3X/9/0/90d032065541cd55e7cbfc7461467348f7f05fe1.png)

X axis is intersect wit Y on -1 point. I excpect 0.0 x 0.0 , central cross !  
Paul

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [March 21, 2020, 6:25pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304/4 "2020-03-21T18:25:55Z")

</div>

Not sure if I understand. Maybe you want the coordinate axis through (0,0)?

```julia
using Plots
x=range(-pi,stop=pi,length=365)
plot(x,sin.(x), framestyle=:origin)

```

---

<div class="post-metadata">

**Author:** ![mbaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbaz/32/17295_2.png) [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Post date:** [March 21, 2020, 10:15pm UTC](https://discourse.julialang.org/t/plots-how-to-get-exact-point-of-intersection-of-a-plot-with-axis/36304/5 "2020-03-21T22:15:04Z")

</div>

With [Gaston](https://mbaz.github.io/Gaston.jl/v0.10.0/):

```julia
using Gaston
x=range(-pi,stop=pi,length=365)
plot(x,sin.(x), xzeroaxis="on", yzeroaxis="on", grid="on")

```

produces  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/f/4fc12bd084f057a379ff8c6bab7e8221f3d2a726.png)
