Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
2

csc plotting help

asked 4 years ago

mzagrabe gravatar image

updated 0 years ago

FrédéricC gravatar image

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.

What do folks think about this?

Thanks for the help!

-matt

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 4 years ago

tmonteil gravatar image

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)
Preview: (hide)
link

Comments

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

mzagrabe gravatar imagemzagrabe ( 4 years ago )

@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.

slelievre gravatar imageslelievre ( 4 years ago )
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,

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 4 years ago

Seen: 800 times

Last updated: Mar 23 '21