This is #17170
On Wednesday, October 22, 2014 4:36:21 PM UTC+1, Emmanuel Charpentier wrote: > > 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 : > > /usr/local/sage-6.3/local/lib/python2.7/site-packages/IPython/core/forma\ > tters.py:239: FormatterWarning: Exception in text/plain formatter: > should never launch viewer in embedded mode > FormatterWarning, > > > then the answer "None". Re-evaluating the cell gets me only the "None" > answer. To get thje curve, I have to type > "plot(sin,[x,-5,5],figsize=3).show()" > > - From emacs with sage_mode 0.12 typing "plot(sin,[x,-5,5],figsize=3)" > [Enter] gets me the following error : > --------------------------------------------------------------------------- > KeyError Traceback (most recent call last) > <ipython-input-11-9dfc8535347b> in <module>() > ----> 1 plot(sin,[x,-Integer(5),Integer(5)],figsize=Integer(3)) > > /usr/local/sage-6.3/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc > > in __call__(self, result) > 251 self.write_output_prompt() > 252 format_dict, md_dict = self.compute_format_data(result) > --> 253 self.write_format_data(format_dict, md_dict) > 254 self.update_user_ns(result) > 255 self.log_output(format_dict) > > /usr/local/sage-6.3/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc > > in write_format_data(self, format_dict, md_dict) > 172 # newline, even if all the prompt separators are ''. This > is the > 173 # standard IPython behavior. > --> 174 result_repr = format_dict['text/plain'] > 175 if '\n' in result_repr: > 176 # So that multi-line strings line up with the left > column of > > KeyError: 'text/plain' > > That happens at every attempt. Typing "plot(sin,[x,-5,5],figsize=3).show()" > gets me the expected curve [ thanks again, Ivan ! ]. > > Is this "new" behaviour expected ? If so, where is it documented ? If not, > isn't it a snafu in output modes expected by the various interfaces ? > > Last but not least : does this deserves a ticket ? > > Other remarks : > > - The absence of typesetting abilities is painful for people (like me) not > well trained in decyphering sage notation for mathematics : I seriously > miss the visual hints of "classical" mathematical notation... I understand > this is planned ; I just hope this has some not-too-low priority. > > - Also on the whishlist : > > - A way to export a worksheet to latex, along te lines of the previous > work on "classical" notebook (sws2tex), but supportingthe ipython format > (hint : the current sws2tex has a nasty bug : trying any worksheet (even > written in pure english, fires up a bug about an impossible conversion to > ascii. I suspect an embedded assumption about encoding that I hacve been > unable to find...). > - A better way to view 3D plots (one can .show() a 3D plot, thus > opening an external viewer, but one gets a static view by default, and the > doc of the default viewer (to be able to change the point of view) is > pretty elusive... > - A way to view() various objects not involving an external \LaTeX > document. > > > > 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.
