Menu

#1483 gnuplot --persist qith QT no mousing

closed-invalid
nobody
None
5
2015-03-23
2014-09-22
sgasp
No

when terminal used is qt and -persist option is used there is no mousing

reproduced on ubuntu 12.04 LTS with gnuplot 4.6.1
reproduced on OS X 10.9.4 with default gnuplot install from macports, 4.6.2.

here is a simple way to reproduce it.

$ GNUTERM=qt gnuplot --persist << EOF
>plot sin(x)
>EOF
sgaspari@tllab221:~$

If -persist option is not used, then the mousing is working fine.
The example below allow to use the mouse to scrool, zoom, etc...

$ GNUTERM=qt gnuplot 

    G N U P L O T
    Version 4.6 patchlevel 1    last modified 2012-09-26 
    Build System: Linux x86_64

    Copyright (C) 1986-1993, 1998, 2004, 2007-2012
    Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info
    faq, bugs, etc:   type "help FAQ"
    immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'qt'
gnuplot> plot sin(x)
gnuplot> 

Related

Bugs: #1483

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-09-22

    Here is the documentation on "persist":

    gnuplot> help persist
    
     Many gnuplot terminals (aqua, pm, qt, x11, windows, wxt, ...) open separate 
     display windows on the screen into which plots are drawn.  The `persist` option 
     tells gnuplot to leave these windows open when the main program exits.
     It has no effect on non-interactive terminal output.
     For example if you issue the command
    
          gnuplot -persist -e 'plot [-5:5] sinh(x)'
    
     gnuplot will open a display window, draw the plot into it, and then exit,
     leaving the display window containing the plot on the screen.  Depending on
     the terminal type, some mousing operations may still be possible in the
     persistent window.  However operations like zoom/unzoom that require redrawing
     the plot are generally not possible because the main program has already exited.
    

    In other words, the behaviour you describe is exactly what you should expect from "persist". No zoom, no scroll, no toggline log-scale, no anything that requires recalculating and redrawing the plot. "persist" basically just leaves the last plot showing on the screen after gnuplot exits.

    I think what you want is not "persist", but this:

          $  gnuplot -e 'plot [-5:5] sinh(x); pause mouse close' &
    

    That leaves gnuplot running in the background so it can manage the display and respond to events that require recalculating the plot.

    This question has come up several times recently, so maybe it belongs in the FAQ.

     
    • sgasp

      sgasp - 2014-09-23

      Ok, It is à RTFM question.

      wxt terminal supports mousing with -persist option on window and Linux.

      --
      Stéphane Gasparini

      Le 22 sept. 2014 à 18:50, Ethan Merritt sfeam@users.sf.net a écrit :

      Here is the documentation on "persist":

      gnuplot> help persist

      Many gnuplot terminals (aqua, pm, qt, x11, windows, wxt, ...) open separate
      display windows on the screen into which plots are drawn. The persist option
      tells gnuplot to leave these windows open when the main program exits.
      It has no effect on non-interactive terminal output.
      For example if you issue the command

        gnuplot -persist -e 'plot [-5:5] sinh(x)'
      

      gnuplot will open a display window, draw the plot into it, and then exit,
      leaving the display window containing the plot on the screen. Depending on
      the terminal type, some mousing operations may still be possible in the
      persistent window. However operations like zoom/unzoom that require redrawing
      the plot are generally not possible because the main program has already exited.
      In other words, the behaviour you describe is exactly what you should expect from "persist". No zoom, no scroll, no toggline log-scale, no anything that requires recalculating and redrawing the plot. "persist" basically just leaves the last plot showing on the screen after gnuplot exits.

      I think what you want is not "persist", but this:

        $  gnuplot -e 'plot [-5:5] sinh(x); pause mouse close' &
      

      That leaves gnuplot running in the background so it can manage the display and respond to events that require recalculating the plot.

      This question has come up several times recently, so maybe it belongs in the FAQ.
      [bugs:#1483] gnuplot --persist qith QT no mousing

      Status: open
      Group: 5.0
      Created: Mon Sep 22, 2014 08:20 AM UTC by sgasp
      Last Updated: Mon Sep 22, 2014 08:20 AM UTC
      Owner: nobody

      when terminal used is qt and -persist option is used there is no mousing

      reproduced on ubuntu 12.04 LTS with gnuplot 4.6.1
      reproduced on OS X 10.9.4 with default gnuplot install from macports, 4.6.2.

      here is a simple way to reproduce it.

      $ GNUTERM=qt gnuplot --persist << EOF

      plot sin(x)
      EOF
      sgaspari@tllab221:~$
      If -persist option is not used, then the mousing is working fine.
      The example below allow to use the mouse to scrool, zoom, etc...

      $ GNUTERM=qt gnuplot

      G N U P L O T
      Version 4.6 patchlevel 1    last modified 2012-09-26 
      Build System: Linux x86_64
      
      Copyright (C) 1986-1993, 1998, 2004, 2007-2012
      Thomas Williams, Colin Kelley and many others
      
      gnuplot home:     http://www.gnuplot.info
      faq, bugs, etc:   type "help FAQ"
      immediate help:   type "help"  (plot window: hit 'h')
      

      Terminal type set to 'qt'
      gnuplot> plot sin(x)
      gnuplot>
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnuplot/bugs/1483/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1483

  • Ethan Merritt

    Ethan Merritt - 2014-09-22
    • status: open --> open-invalid
     
  • Ethan Merritt

    Ethan Merritt - 2014-10-12
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.