Ask Your Question
1

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

asked 7 years ago

screened00 gravatar image

updated 7 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

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:

Preview: (hide)
link

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

Stats

Asked: 7 years ago

Seen: 378 times

Last updated: Apr 23 '17