Ask Your Question
1

sage.plot.plot3d.shapes2.Line() does not work in the cloud

asked 2015-09-23 20:49:15 +0100

Jeremy Martin gravatar image

The following code (straight from http://doc.sagemath.org/html/en/refer...) does not work in the SageMath Cloud, at least not for me:

from sage.plot.plot3d.shapes2 import Line
Line([(i*math.sin(i), i*math.cos(i), i/3) for i in range(30)], arrow_head=True)

The result is a long error message ending with "TypeError: 0 is not JSON serializable". Am I doing something wrong?

edit retag flag offensive close merge delete

Comments

I guess I can just use line3d() instead.... but maybe this error indicates something else is going on.

Jeremy Martin gravatar imageJeremy Martin ( 2015-09-24 18:35:08 +0100 )edit

I think this is a SMC 3d renderer bug, as this works fine in the normal Sage notebook.

kcrisman gravatar imagekcrisman ( 2015-09-25 09:23:41 +0100 )edit
1
William Stein gravatar imageWilliam Stein ( 2015-09-25 17:42:25 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-24 02:31:59 +0100

fidbc gravatar image

You don't seem to be doing anything wrong.

Another option to get similar output is to use the line3d function.

line3d([(i*math.sin(i), i*math.cos(i), i/3) for i in range(30)], arrow_head=True)
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

Stats

Asked: 2015-09-23 20:49:15 +0100

Seen: 267 times

Last updated: Sep 24 '15