# plot3d not displaying - only says "Graphics3d Object"?!

Hello

I have a problem, I hope you can help. I'm trying to use plot3d, but instead of drawing a plot, it just prints out the text "Graphics3d Object"

Here is an example Sage snippet that exhibits this problem:

f(x,y) = abs(x*y)
X = plot3d(f, (x,105,72), (y,0.8293,55.8271));
show(X)


I have seen some functions plot OK -- I can't see a pattern to when it does and doesn't work. For example, this does work:

f(x,y) = abs(x*y)
X = plot3d(f, (x,0,10), (y,0,10));
show(X)


This bug is repeatable. I am using 64 bit Linux Mint (Ubuntu), and using the notebook in latest Firefox.

Any help much appreciated. Thank you, - Daniel

edit retag close merge delete

Sort by » oldest newest most voted

Or because you use a symbolic function?

Try the following:

f = lambda x, y: abs(x*y)
X = plot3d(f, (72, 105), (0.8293, 55.8271))
X


or maybe one of the following:

show(X)
show(X, viewer='threejs')
view(X)
view(X, viewer='threejs')

more

Yes, xmin > xmax is certainly the reason:

sage: x, y = var('x y')
sage: f(x,y) = abs(x*y)
sage: X = plot3d(f, (x,105,72), (y,0.8293,55.8271))
sage: X
/home/eric/sage/8.2.beta8/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while displaying object: can't convert negative value to size_t
RichReprWarning,
Graphics3d Object


from plot3d? :

...
* "urange" - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min,
u_max)


But the doc does not state that u_min has to be < u_max. Therefore, we have to fix this by either

• stating that u_min has to be less than u_max, or
• inserting something along the lines of

u_min, u_max=(min(u_min, u_max), max(u_min, u_max))

in plot3d source.

Is that bug already reported ?