Menu

Close Graphs

Help
Alex D
2015-03-07
2015-03-10
  • Alex D

    Alex D - 2015-03-07

    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

     
  • Ethan Merritt

    Ethan Merritt - 2015-03-07

    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.

     
  • Alex D

    Alex D - 2015-03-07

    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
  • Ethan Merritt

    Ethan Merritt - 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.

     
  • Alex D

    Alex D - 2015-03-08

    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

     
  • Bastian Märkisch

    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.

     
  • Alex D

    Alex D - 2015-03-10

    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

     
  • Ethan Merritt

    Ethan Merritt - 2015-03-10

    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?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.