Hi sage-support community!

Recently I've tried the following code at sagecell (permalink 
here<http://sagecell.sagemath.org/?z=eJylkMsOgyAQRfdN-g-zE5MJGR9ddMFfdN9QOlYTLQYx1b8vpDX2sTRsmDlwLowHBSdt6tnexeR4UCURzssGjO7Y6bPhu2enRI6ElKb7nZdtc6u9ECUWmKcIJHMEkWFYL-558qNjkfg8QdDdpQkORTJDuDZVNQ4ciiPC0LMZW-1CdUCwvTaNn1UmY7htbQjN1tBVWmyUUnjpn7TcLKXl-0Nfc3DGVjhNy4TiNL55pJ-8SH7vR8PKyzev7UOkT6E7fF4=&lang=sage>
):

t = Tachyon(xres=400,yres=400, camera_center=(2,0,0))
t.light((4,3,2), 0.2, (1,1,1))
t.texture('t2', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
1,0,0))
t.texture('t3', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
0,1,0))
t.texture('t4', ambient=0.1, diffuse=0.9, specular=0.5, opacity=1.0, color=(
0,0,1))
t.sphere((0,0.5,0), 0.2, 't2')
t.sphere((0.5,0,0), 0.2, 't3')
t.sphere((0,0,0.5), 0.2, 't4')
t.show()

And this was the result:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-d6c906df5871> in <module>()
      7 t.sphere((RealNumber('0.5'),Integer(0),Integer(0)), RealNumber('0.2'), 
't3')
      8 t.sphere((Integer(0),Integer(0),RealNumber('0.5')), RealNumber('0.2'), 
't4')
----> 9 t.show()

/home/sageserver/sage/local/lib/python2.7/site-packages/sage/plot/plot3d/tachyon.pyc
 in show(self, verbose, extra_opts)
    320             filename = graphics_filename()
    321             self.save(filename, verbose=verbose, extra_opts=extra_opts)
--> 322             sage.misc.misc.display_image(filename)
    323             return
    324         filename = tmp_filename(ext='.png')

AttributeError: 'module' object has no attribute 'display_image'


Same code works fine at www.sagenb.org: it shows the three spheres

I've searched sage-support, ask sage and trac sage, but couldn't find any 
similar issue.

Checking the source code I coded the following workaround within the cell (
permalink<http://aleph.sagemath.org/?z=eJylkcluxCAMhu-V-g7cQiQLkaWHHniL3iOXcRKkLAhINXn7Go1QuhxHHMD-7c_YTsKID7TzuW_yHiiaXms4y0NYXCngYGlLFIxsQYOu69eXpBY3zUnKHjpoaxBatSBkA3weeqJ7OgLJKrUVCFw_HTOMVg2ImxvHIxIb7yCiJ3ssGNh6A7F7tC6dplG5-L7sXLS5il7Q7kmo5p_-g_ZPQ3VpP_qZmJldHK3LhPI0futZ_al31d_8TLj0PuujW2jj1fDyIk6kVhct97H6PWA4hyyrKaCfnY1DCZYPMH6RLC72XPk3F_2CZ7kHt7J0hX4DouKkKQ==&lang=sage>
):

# t is as above
# t.show() replaced by:
filename = sage.misc.temporary_file.graphics_filename()
t.save(filename)
sage.misc.display.display_image(filename)

Is this a bug in the method show() from the Tachyon class?

Thanks in advance,

Share_The_Sage!


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to