bugGNU Octave - Bugs: bug #31161, image() opens gnuplot despite...

 
 

bug #31161: image() opens gnuplot despite image_viewer("xloadimage %s")

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Wed 29 Sep 2010 05:56:31 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.3.52Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 22 Oct 2010 08:30:09 AM UTC, comment #2:

I removed the image_viewer function from Octave, and with it, support for viewing images with external programs like xloadimage, so I'm closing this bug report.

John W. Eaton <jwe>
Project Administrator
Mon 18 Oct 2010 04:15:35 PM UTC, comment #1:

I consider using image viewers other than the Octave graphics renderer (currently either gnuplot or the new OpenGL+FLTK backend) to be obsolete because it is highly unlikely that any external image viewer will ever integrate properly with Octave's other graphics features. So rather than fixing the graphics backends to respect the image_viewer selection, I think we should be removing support for this feature. But before doing that, I will discuss it with others on the maintainers mailing list.

If you want to use some external program to view images, it should be relatively easy to write a function that would save the image using imwrite and then call system to run the external program to display the image file.

John W. Eaton <jwe>
Project Administrator
Wed 29 Sep 2010 05:56:31 AM UTC, original submission:

Debian squeeze, Linux version 2.6.32-5-amd64 (Debian 2.6.32-20) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-2) ) #1 SMP Thu Aug 12 13:01:50 UTC 2010

fresh build (28.9.2010) from the mercurial version http://www.octave.org/hg/octave

GNU Octave, version 3.3.52+

HowTo reproduce:
octave -q
image_viewer("xloadimage %s")
image(rand(100)*100)

this opens a gnuplot windows with title "Figure 1" and the axes scaled from 1..100 (not expected) and the expected xloadimage windows.

Looking deeper into /usr/local/share/octave/3.3.52+/m/image/image.m
I see that
[ax, varargin, nargin] = _plt_get_axis_arg_ ("image", varargin{:});
opens the gnuplot window. I set a "keyboard" before and after the line. After the first "return" the gnuplot windows pops up.

by the way:
function _img_via_file_ in image_viewer.m
calls "status = system (sprintf ("( %s && %s) > /dev/null 2>&1 &", command, rm));"
but because the command is run in background (the last &), status always equals to 0 so the error message "image_viewer: the image viewing command failed" is never shown.

HowTo reproduce:
octave -q
octave:1> image_viewer("this_is_no_valid_command %s")
octave:2> image(rand(200)*100)
octave:3>

Opens an empty (only axes) gnuplot windows but I think it is intended, that the error message above should be shown instead.

best regards, Andy

Andreas Weber <andy1978>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by andy1978 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Oct 2010 08:30:09 AM UTCjweStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1