# csc plotting help

Hello,

I'm new to SAGE and am having trouble plotting a cosecant (csc) curve.

Here is my input:

plot(csc(x), (x,-3*pi, 3 * pi))

but the output doesn't show the curves approaching the asymptotes as I would expect.

Thanks for the help!

-matt

edit retag close merge delete

Sort by ยป oldest newest most voted

I would say that the plotting is messed with points of very high ordinate. To fix this, you can first give a name to your plot:

sage: p = plot(csc(x), (x,-3*pi, 3 * pi))


And then render it by limiting the ordinate, say, to the interval $[-4,4]$:

sage: p.show(ymin=-4, ymax=4)

more

Thanks for the tip, Thierry! It looks good now.

( 2021-03-23 19:11:21 +0200 )edit

@mzagrabe -- if it solves your question, please accept the answer by clicking the check mark at its top left (below the question's score). This will mark the question as solved in the list of questions.

( 2021-03-23 22:10:06 +0200 )edit
1

Alternative solution : add the ym{in|ax} arguments to the plot call :

plot(csc(x), (x,-3*pi, 3 * pi), ymin=-4, ymax=4)


HTH,

( 2021-03-24 00:59:45 +0200 )edit