First time here? Check out the FAQ!

Ask Your Question
1

exit show to return to sage command line

asked 7 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 7 years ago

tmonteil gravatar image

updated 7 years ago

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.

Preview: (hide)
link

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 ( 7 years ago )

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: 7 years ago

Seen: 646 times

Last updated: Apr 27 '17