Ask Your Question

exit show to return to sage command line

asked 2017-04-27 04:29:21 -0500

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

answered 2017-04-27 04:57:24 -0500

tmonteil gravatar image

updated 2017-04-27 05:00:54 -0500

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 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


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.misc.viewer.browser()
'sage-native-execute /home/sage/notebook-browser'

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

ortollj gravatar imageortollj ( 2017-04-28 01:11:41 -0500 )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


Asked: 2017-04-27 04:29:21 -0500

Seen: 115 times

Last updated: Apr 27