Gnuplot switch for default output

In gnuplot using commands

set term pdf
set out 'filename.pdf'
plot sin(x)

allows me to write the image in pdf. After that, how to reset the output so that it plot sin(x)creates an image using the built-in gnuplot display (as in the case with set out).

Right now I can achieve this by restarting gnuplot. The team resetdoes not seem to help. Thanks everyone!

+5
source share
2 answers

Suppose you have gnuplot X11 installed. Set the terminal back to x11 and reset to exit

set term x11
set out
+4
source

In addition to another answer, you can:

set term pop
set output   #reset standard output stream

In general, you can save the terminal settings that you are currently using using:

set term ... #what you want to save
set term push
set term ... #temporary terminal
set term pop #restore the terminal settings that you "pushed"

However, as described in help set terminal:

set term push ,   set term pop . save term  load term, .   ,  . gnuplot  startup .   set term pop ,   .

+7

All Articles