Ask Your Question

Importing saved 3d plot

asked 2010-09-19 08:45:43 -0500

Benhuard gravatar image

Hi everyone,

I generated a bunch of 3d plots to produce an animation and I saved them both as png and sobj files, because I wanted to keep the objects for later manipulations. However, when loading back an sobj file, I find them to be unusable. More precesily,

p=plot3d(lambda x1,y1: h(t0,x1,y1), (-5,5),(-5,5),plot_points=100); #t0 fixed and h(t,x,y) a procedure'bump003.sobj');'bump003.png');
a = load('bump003.sobj');;

returns the error

NotImplementedError: You must override the get_grid method.

while the png image files get correctly generated.

There is no mention of this kind of error in the Plot3D doc, except for parametric surfaces

where it is mentioned that get___grid should indeed be overriden for subclasses of parametric_surface. Any idea why this error shows up only after importing the object ?

Many thanks, Benhuard

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2010-09-20 05:20:31 -0500

kcrisman gravatar image

I can confirm this with an easier example:

sage: var('x,y')

(x, y)

sage: f(x,y)=x^2+y^2

sage: p=plot3d(f,(-5,5),(-5,5))

sage: p # works fine


sage: q = load('test.sobj')

sage: q

NotImplementedError: You must override the get_grid method.

I will try to look into this later; it's puzzling to me, since we get

sage: type(q)

<type 'sage.plot.plot3d.parametric_surface.ParametricSurface'>

sage: type(p)

<type 'sage.plot.plot3d.parametric_surface.ParametricSurface'>

as expected.

edit flag offensive delete link more


This is now #9957; I don't think this will be immediate to fix.

kcrisman gravatar imagekcrisman ( 2010-09-20 09:40:56 -0500 )edit

answered 2010-09-20 02:57:46 -0500

niles gravatar image

updated 2010-09-20 06:27:33 -0500

Hi Benhuard,

This isn't an answer to your question, but I wanted to point out that @mhampton seems to have alternate ways of producing 3D animations, which maybe you could use to work around your problem. He mentioned them in his answer to my question animate 3d plots.

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


Asked: 2010-09-19 08:45:43 -0500

Seen: 340 times

Last updated: Sep 20 '10