Answer below.

Le mercredi 22 octobre 2014 19:32:03 UTC+2, kcrisman a écrit :
>
>
>
>
> This is #17170
>>
>>>  
>
>> I took some time (at last...) to experiment with sage 6.4beta6 and the 
>>> new (and impressive !) IPython notebook, and I noticed something curious in 
>>> the behaviour of graphics in various interfaces.
>>>
>>> - From command line, typing  "plot(sin,[x,-5,5],figsize=3)" [Enter] 
>>> opens an mage viewer with the resultant curve. Nothing new.
>>>
>>> - From the IPython notebook, started with sage -n ipython, typing 
>>> "plot(sin,[x,-5,5],figsize=3)" [Enter] gets me the curve.as expected.
>>>
>>> But,
>>>
>>> - From the "classic" notebook, started with sage -n, typing 
>>> "plot(sin,[x,-5,5],figsize=3)" [Enter] gets me a warning :
>>>
>>>
> Yes, please check whether this works on your own platform!  This was a 
> pretty surprising and obviously major regression but this will hopefully 
> fix it.  See if you have any caching issues with 3d plots as well, if you 
> could (that is, evaluating different 3d plots in the same cell - do they 
> change when "live")? 
>

Okay.

1) "Classic notebook
First cell :
 
## Let's go for maximal poor taste :
var("y")
p1=plot3d(sin(sqrt(x^2+y^2))/sqrt(x^2+y^2),[x,-10,10],[y,-10,10], 
opacity=0.5)
p2=plot3d((x^2+y^2)/100-1,[x,-10,10],[y,-10,10], color="yellow",opacity=0.5)
(p1+p2)

Gives nothing unless I add ".show()" at the end of the last line, which 
gives me the expected jmol figure (my browser bugs me to allow it...).

Second cell :

(p1+p2).show()

Same jmol figure. Same plea from the browser. I use the "advanced controls" 
to get a mesh and spin it (easier visual control).

Coming back to first cell,  I change -1 to +1 at the end of the definition 
of p2, then re-evaluate the cell. The first jmol restarts, re-bugs me, and 
displays an updated figure. THE SECOND JMOL DOESN'T CHANGE. Is that what 
you expected ?

Coming back to the first cell, I try to add :
p1.show()
p2.show()
before the "(p1+p2).show()" statement. Only the last one has an effect.

Getting back to the second cell, I try to use the "java3d" viewer ; this 
gives me a faint 3d box, a very faint sketch of the figure and a mention 
"Click for interactive view" which does nothing.
Similarly, the "canvas3d" viewer shows me only p1, and is extremely 
difficult to control from my touchpad.
Finally, "tachyon" gives me the same very faint image that "java3d" does.

2) ipython notebook

Same results except that 1) the jmol window is not embedded in the 
worksheet, and 2) it cannot spin the image.

Trying the "canvas3d" viewer gives an error :

---------------------------------------------------------------------------UnboundLocalError
                         Traceback (most recent call 
last)<ipython-input-7-28ecb40df328> in <module>()----> 1 
(p1+p2).show(viewer="canvas3d")
/usr/local/sage-6.3/local/lib/python2.7/site-packages/sage/plot/plot3d/base.so 
in sage.plot.plot3d.base.Graphics3d.show 
(build/cythonized/sage/plot/plot3d/base.c:15311)()
UnboundLocalError: local variable 'viewer_app' referenced before assignment

"java3d gives nothing ; "tachyon" a very faint png image in a separate 
image viewer.

HTH,

--
Emmanuel Charpentier


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

Reply via email to