Ask Your Question
1

exit show to return to sage command line

asked 2017-04-27 11:29:21 +0100

ortollj gravatar image

I tried like in tutorial

sage: t = var('t')
sage: p1 = plot(cos(2*t) + 2*cos(t), (t,0, 2*pi), rgbcolor=hue(0.3))
sage: p2 = plot(4*cos(t) - cos(2*t), (t,0, 2*pi), rgbcolor=hue(0.6))
sage: show(p1 + p2)

and I can see a beautiful bicolour image of the 2 curves

But then impossible to find the touch combination (I tried a lot , q, Q, Ctrl D, exit, quit, escape.....) to exit the graph an return to sage command line

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-27 11:57:24 +0100

tmonteil gravatar image

updated 2017-04-27 12:00:54 +0100

It depends on your png viewer. If you do not like this png viewer because there is no way to qui it, you can try to see the picture in your webbrowser instead, see http://doc.sagemath.org/html/en/refer... for more details. For example, you can type:

sage: viewer.png_viewer('display')

It is possible that your default viewer is imagemagick, in this case, you can right-cligk on the picture with your mouse and select Quit at the bottom of the column.

edit flag offensive delete link more

Comments

thanks for the link tmonteil but maybe show() does not use the sage function png_viewer ?

sage: png_viewer(app=None)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-c2e04a75613f> in <module>()
----> 1 png_viewer(app=None)
NameError: name 'png_viewer' is not defined
sage:

sage: sage.misc.viewer.browser()
'sage-native-execute /home/sage/notebook-browser'
sage:

show(p1+p2) do the same thing than pretty_print(p1+p2)

ortollj gravatar imageortollj ( 2017-04-28 08:11:41 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-04-27 11:29:21 +0100

Seen: 618 times

Last updated: Apr 27 '17