# Why my Cosecant Plot different from the Textbook?

**URL:** <https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [November 22, 2022, 5:57pm UTC](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660 "2022-11-22T17:57:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [November 22, 2022, 5:57pm UTC](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660/1 "2022-11-22T17:57:39Z")

</div>

Hi all,

I am trying to plot:

```julia
f(x) = 8csc(x) + 8csc(75-x)
plot(f, 0, 75)

```

But the plot is different from the textbook, can anyone explain why?

 ![Capture d’écran_2022-11-23_00-53-31](https://global.discourse-cdn.com/julialang/original/3X/e/b/eba40fb364c0afc4db37380014aba0b1cadb6a53.png)  
t

---

<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:** [November 22, 2022, 6:07pm UTC](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660/2 "2022-11-22T18:07:17Z")

</div>

The problem is that your textbook assumes angles are expressed in degrees, whereas Julia assumes radians.

Julia supports degrees as well, but you need to use a special funciton name.Try this:

```julia
f(x) = 8cscd(x) + 8cscd(75-x)

```

---

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [November 22, 2022, 6:09pm UTC](https://discourse.julialang.org/t/why-my-cosecant-plot-different-from-the-textbook/90660/3 "2022-11-22T18:09:15Z")

</div>

Thanks a lot @mbaz , I just know about this!
