Ask Your Question

How to draw x^2-3*y^2=4 2d plot ?

asked 2017-04-23 18:05:08 +0200

screened00 gravatar image

updated 2017-04-23 18:05:38 +0200

It shows error, when I use 'y' variable, and says it is not defined.

So only plots of the form y=f(x) are allowed. How do I overcome this limitation in plotting?

And also how are 2d plots converted to 3D. I know how to do it. But how is it possible to make a 3d plot of a curve say, sin , as it is inherently in 2 dimensions.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-23 20:35:36 +0200

mforets gravatar image

the first issue is probably because you didn't define the variable y, this can be done typing y = var('y'). The fact that this is not necessary for the x variable is because it is predefined at the startup of Sage. If you find yourself using very often the variable y (or other variables or functions), then it's possible to load them at startup by using the init.sage file, as explained in sage startup scripts.

for the questions on plotting, you may consider these functions as starting point:

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2017-04-23 18:05:08 +0200

Seen: 318 times

Last updated: Apr 23 '17