bugGNU Octave - Bugs: bug #44932, Add support for gnuplot xterm...

 
 

bug #44932: Add support for gnuplot xterm terminal type

Submitted by:  None
Submitted on:  Mon 27 Apr 2015 01:04:19 AM UTC  
 
Category: Plotting with gnuplotSeverity: 1 - Wish
Priority: 3 - LowItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Aaron JacksonOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 19 Dec 2015 01:18:14 AM UTC, comment #10:

No. I Octave still hangs. I have no problem with other gnuplot terminals.

Ben Abbott <bpabbott>
Project Member
Sat 19 Dec 2015 01:08:17 AM UTC, comment #9:

Ben,

Does
plot (rand (3))
pause (10)
plot (rand (3))

work for you?
If so, this looks like the age old timing glitch
in the plot code. I thought that this had been
dealt with a while ago, but maybe not in the gnuplot
path...

Michael Godfrey <godfrey>
Project Member
Sat 19 Dec 2015 12:37:53 AM UTC, comment #8:

Aaron,

When I try your patch my octave gets hung up with by

If I insert a "close all" between the two plot commands, then everything works. I'm running Gnuplot v5 on Mac OS X.

Do you see the same behavior? If so, we may need some more effort to improve the user friendliness.

Ben Abbott <bpabbott>
Project Member
Tue 28 Apr 2015 11:09:14 AM UTC, comment #7:

Silly me - I realised it was a race condition. Attached is a fairly clean patch.

(file #33822)

Aaron Jackson <aaronjackson>
Tue 28 Apr 2015 10:35:38 AM UTC, comment #6:

Attached is the patch. Thanks for your help Mike.

(file #33820)

Aaron Jackson <aaronjackson>
Tue 28 Apr 2015 12:52:03 AM UTC, comment #5:

You might as well post your patch here on this bug report so others interested can find it in the most relevant place. Even if it is not ideal and not suitable for inclusion in Octave yet. Someone else may be able to find a different way to make it work.

Mike Miller <mtmiller>
Project Administrator
Mon 27 Apr 2015 05:41:43 PM UTC, comment #4:

So I managed to get it to work, but the patch is not particularly nice.

When gnuplot is set to xterm, it will not output to a file in the same way as it would when set to dumb. This means I am forced to get the output from popen2, which stops working after the first read. The only way I could get it to work repeatedly is to SIGTERM gnuplot and set _plot_stream_ to [].

This works fine until you put it in a loop. The rapid forking and terminating of gnuplot seems to cause errors.

I do not think my patch is worthy of a merge, but I am happy to share if people want it.

Anonymous
Mon 27 Apr 2015 01:39:46 PM UTC, comment #3:

Ok, I see what you're talking about now. I agree, this does not work, and there is probably some scripting support needed in the gnuplot m-files to support this terminal type. I now see there are some special cases for the "dumb" type, where the plot goes to stdout, it is actually written to a file, read back and then printed to the terminal. It probably needs something similar for "xterm" or any other terminal types where the plot data is expected to come over stdout back to the terminal that Octave is running on. Please feel free to provide a patch to make this work if you are interested in seeing support for this added to Octave.

Mike Miller <mtmiller>
Project Administrator
Mon 27 Apr 2015 10:18:50 AM UTC, comment #2:

Setting GNUTERM to dumb works fine, if you set it to xterm, it would just spew out the data which xterm will parse.

It should be as simple as setenv('GNUTERM', 'xterm') - if you are using an xterm, the tektronix plot will appear in a new window.

I tried to make this work by adding xterm to the list in output_to_screen, in _gnuplot_drawnow_.m, although this should not be necessary. I am assuming there is another issue somewhere.

Anonymous
Mon 27 Apr 2015 01:42:16 AM UTC, comment #1:

Thanks for your bug report. What have you tried to make this work? I am not familiar with the plotting mode you are talking about in gnuplot, so how do you make it work with gnuplot? You'll have to give some more details on what you did and what doesn't work as expected. Do you have to "set term" to a specific terminal mode? If so, just set the GNUTERM environment variable in Octave to do the same. Octave should respect whatever GNUTERM is set to. If I `setenv GNUTERM dumb`, I get ascii-art plots as I expect.

Mike Miller <mtmiller>
Project Administrator
Mon 27 Apr 2015 01:04:19 AM UTC, original submission:

I use GNU Plot over SSH in an xterm, as plots will appear nicely using the tektronix mode without the need for X forwarding.

Am I right in thinking the same should be happening when in GNU Octave? No window appears.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #33822:  xtermfix.diff added by aaronjackson (2KiB - text/x-patch)
file #33820:  xtermfix.diff added by aaronjackson (2KiB - text/x-patch)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by aaronjackson (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 24 Nov 2016 12:31:26 AM UTCmtmillerDependencies-=>bugs #49333 is dependent
    Tue 28 Apr 2015 11:09:14 AM UTCaaronjacksonAttached File-=>Added xtermfix.diff, #33822
    Tue 28 Apr 2015 10:35:38 AM UTCaaronjacksonAttached File-=>Added xtermfix.diff, #33820
    Mon 27 Apr 2015 01:39:46 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Priority5 - Normal=>3 - Low
      Item GroupIncorrect Result=>Feature Request
      StatusNeed Info=>Confirmed
      Release3.8.1=>dev
      Summaryxterm plotting=>Add support for gnuplot xterm terminal type
    Mon 27 Apr 2015 01:42:16 AM UTCmtmillerItem GroupNone=>Incorrect Result
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1