Menu

#214 wxt terminal fails to paint on launch + weird double drawing

open
nobody
None
5
2017-03-07
2017-03-05
Peter
No

I have built gnuplot v5.0.5 from source on Linux Min 17.3. I used ./configure --with-qt5 --with-wx-single-thread. (Not wholly sure about the 'single thread' bit. Unable to find any documentation so trawled this option off the net. The build does not complain.)

The qt terminal works fine. The wxt terminal also seems to work fine in interactive mode. But when I try running a script from the command line with the wxt terminal (first script line 'set term wxt' to reset from the qt default), the plot area of the terminal is black. It does not appear to be painted on first presentation.

If I resize using the menu item in the icon, I get the graph I expect and it sort of works. If I do the initial resize by dragging the bottom right corner of the terminal's window, sometimes it repaints properly. Sometimes one of the plots (always the last plotted) is double drawn and badly messed up - this persists no matter what else I do until closing. In addition, when I resize and things look fine, if I hit "Autoscale" in the toolbar, the same double drawing usually occurs... but not always. All this behaviour is really weird, especially the intermittent nature of the problems!!

I have built against both libwxgtk2.8-dev and libwxgtk3.0-dev, and I get the same behaviour.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2017-03-05

    I do not recognize those symptoms and I have no explanation or fix.

    If you reported your configuration command accurately, I think you did not end up with a single-threaded wxt build because the option was not specified correctly. You need to say

        ./configure --with-wx-single-threaded
    

    (note "threaded" rather than "thread"). So I suppose you can try that first and see if it makes a difference. The terminal section of the configure script output should list

      aqua terminal (OSX): no
      libgd-based png, jpeg, and gif terminals: yes (with animated gif)
      cairo-based pdf and png terminals: yes 
      lua/TikZ terminal: yes 
      wxt terminal: yes (single-threaded)
      Qt terminal: yes (qt5)
    

    My recommendation would be that if the qt terminal works, use it and forget about wxt. That's what I do for ordinary purposes :-) The wxt terminal has no advantage over qt that I know of.

     
    • Peter

      Peter - 2017-03-06

      On 05/03/17 23:12, Ethan Merritt wrote:

      I do not recognize those symptoms and I have no explanation or fix.

      If you reported your configuration command accurately, I think you did
      not end up with a single-threaded wxt build because the option was not
      specified correctly. You need to say

       ./configure --with-wx-single-threaded
      

      (note "threaded" rather than "thread").

      My apologies. I transcribed the configure option incorrectly. It was
      "...-threadED". And I do end up with the configure output below. (FWIW:
      I would have expected the configure script to have choked on an invalid
      option.)

      So I suppose you can try that first and see if it makes a difference.
      The terminal section of the configure script output should list

      aqua terminal (OSX): no
      libgd-based png, jpeg, and gif terminals: yes (with animated gif)
      cairo-based pdf and png terminals: yes
      lua/TikZ terminal: yes
      wxt terminal: yes (single-threaded)
      Qt terminal: yes (qt5)

      My recommendation would be that if the qt terminal works, use it and
      forget about wxt. That's what I do for ordinary purposes :-) The wxt
      terminal has no advantage over qt that I know of.

      Well that was what I was trying to evaluate!

      Also, from http://gnuplot.sourceforge.net/docs_4.2/node441.html, "When
      you resize a window, the plot is immediately scaled to fit in the new
      size of the window. . Unlike other interactive terminals, the wxt
      terminal scales the whole plot, including fonts and linewidths, and
      keeps its global aspect ratio constant, leaving an empty space painted
      in gray." That seems potentially useful to me!


      [support-requests:#214]
      https://sourceforge.net/p/gnuplot/support-requests/214/ wxt terminal
      fails to paint on launch + weird double drawing

      Status: open
      Group:
      Created: Sun Mar 05, 2017 08:42 PM UTC by Peter
      Last Updated: Sun Mar 05, 2017 08:42 PM UTC
      Owner: nobody

      I have built gnuplot v5.0.5 from source on Linux Min 17.3. I used
      ./configure --with-qt5 --with-wx-single-thread. (Not wholly sure about
      the 'single thread' bit. Unable to find any documentation so trawled
      this option off the net. The build does not complain.)

      The qt terminal works fine. The wxt terminal also seems to work fine
      in interactive mode. But when I try running a script from the command
      line with the wxt terminal (first script line 'set term wxt' to reset
      from the qt default), the plot area of the terminal is black. It does
      not appear to be painted on first presentation.

      If I resize using the menu item in the icon, I get the graph I expect
      and it sort of works. If I do the initial resize by dragging the
      bottom right corner of the terminal's window, sometimes it repaints
      properly. Sometimes one of the plots (always the last plotted) is
      double drawn and badly messed up - this persists no matter what else I
      do until closing. In addition, when I resize and things look fine, if
      I hit "Autoscale" in the toolbar, the same double drawing usually
      occurs... but not always. All this behaviour is really weird,
      especially the intermittent nature of the problems!!

      I have built against both libwxgtk2.8-dev and libwxgtk3.0-dev, and I
      get the same behaviour.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/support-requests/214/

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

       
  • Peter

    Peter - 2017-03-06

    OK. I have built this on a second machine with the same outcome. However, I have tracked down the issue of the blank initial screen + double-drawing to the 'set multiplot' command. The minimal script to reproduce is:

    set term wxt title "wxt terminal"
    set multiplot
    plot cos(x)
    pause -1 "Hit return to continue"

    Comment out "set multiplot" and it works fine. BTW: This works as expected with the qt terminal so I am thinking bug.

    Any comments before I file a ticket?

     
  • Ethan Merritt

    Ethan Merritt - 2017-03-06

    I suppose it shows a bug somewhere, or at least an inconsistency since I don't see the same thing here. But multiplot is not guaranteed to display anything prior to the final "unset multiplot". What happens if you add "unset multiplot" before the pause statement?

     
  • Peter

    Peter - 2017-03-07

    Ah-hah! Adding "unset multiplot" and it works correctly! (I remember reading in the manual that this was required for some terminals but didn't join the dots. Doh!) Thanks!

    However, the 'autoscale' feature still messes up multiplots

    FWIW: The wxt terminal looks pretty good to me. I like the feature that retains the page's aspect ratio on resize.

     
  • Peter

    Peter - 2017-03-07

    Just as a tailpiece to this, if you include "unset multiplot" in a script, this screws up the qt terminal! The multiplot displays correctly initially, but either resizing the window or hitting the 'Replot' button causes only part of the page to be redrawn. (Seemingly, the last-drawn graph.)

    Aaaaargh!!

     
    • Ethan Merritt

      Ethan Merritt - 2017-03-07

      That is an intrinsic limitation of multiplot. You cannot redraw plots that are not current, and only the most recent plot in a multiplot is current. For the same reason mouse feedback from a multiplot is only valid for the most recent component. This is true for all output modes, not just qt.

       

Log in to post a comment.