Hello, I would like to know how can I close the graphs that gnuplot display. That must be by a command in a file with extension .gp, I'm programming something in linux that execute a lot of graphs and it's very annoying close one by one
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are talking about output to a file:
unset output
If you mean windows displayed on the screen, they only remain open if you explicitly use the "-persist" option. So don't use it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I unset it. My programm makes a call to a file called conf.gp, That file displays some graphs but i want to make my programm close all the graphs. I suppose that i need to make another call to another .gp file
Last edit: Alex D 2015-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's no need to view the code. I'm just asking for a command that can close the windows that are displaying the graphs. Conf.gp only says plot x ...(many times)... so how can I close those windows that have been open from another .gp file
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
gnuplot will close graph windows automatically on program exit if not in persist mode. So don't use the '-p' program option or the persist terminal option.
I assume that you also use set term x11/wxt/qt <n> to open new windows. (Otherwise you wouldn't get more than one window.) All those terminals have a close option to close windows, see help wxt/qt/x11.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh that's right. I had persist mode... but so how can I avoid the graphs closing themselfs very quickly. I want to make them seen as an animation while the pogram shows certain information and do certain calculus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At the end of each frame of the animation:
pause 2 # wait for 2 seconds before proceeding
But...
Why are you opening a new window each time?
If it's an animation, don't you want a single graph window that stays open while the contents are replaced by successive frames of the animation?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I would like to know how can I close the graphs that gnuplot display. That must be by a command in a file with extension .gp, I'm programming something in linux that execute a lot of graphs and it's very annoying close one by one
If you are talking about output to a file:
unset output
If you mean windows displayed on the screen, they only remain open if you explicitly use the "-persist" option. So don't use it.
How can I unset it. My programm makes a call to a file called conf.gp, That file displays some graphs but i want to make my programm close all the graphs. I suppose that i need to make another call to another .gp file
Last edit: Alex D 2015-03-07
No one can help you if you do not show the commands you are using. If they are in a file called "conf.gp", then provide a listing of that file.
There's no need to view the code. I'm just asking for a command that can close the windows that are displaying the graphs. Conf.gp only says plot x ...(many times)... so how can I close those windows that have been open from another .gp file
gnuplot will close graph windows automatically on program exit if not in
persist
mode. So don't use the '-p' program option or thepersist
terminal option.I assume that you also use
set term x11/wxt/qt <n>
to open new windows. (Otherwise you wouldn't get more than one window.) All those terminals have aclose
option to close windows, seehelp wxt/qt/x11
.Oh that's right. I had persist mode... but so how can I avoid the graphs closing themselfs very quickly. I want to make them seen as an animation while the pogram shows certain information and do certain calculus
At the end of each frame of the animation:
pause 2 # wait for 2 seconds before proceeding
But...
Why are you opening a new window each time?
If it's an animation, don't you want a single graph window that stays open while the contents are replaced by successive frames of the animation?