octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fltk printing


From: Ben Abbott
Subject: Re: fltk printing
Date: Sun, 08 Aug 2010 11:57:44 -0400

On Aug 8, 2010, at 11:36 AM, Michael D Godfrey wrote:

> On 08/07/2010 07:19 PM, Ben Abbott wrote:
>> On Aug 7, 2010, at 10:06 PM, Michael D Godfrey wrote:
>> 
>> 
>>> > 
>>> On 08/07/2010 06:40 PM, Ben Abbott wrote:
>>> 
>>>> >> 
>>>> If you add `'disp("__go_close_all__")'  to __go_close_all__, create the my 
>>>> foobar.m function add type `atexit ("foobar")' at the command line, what 
>>>> happens when you ...
>>>> 
>>>> >> 
>>>> >> 
>>>>    close all
>>>> 
>>>> >> 
>>>>    backend fltk
>>>> 
>>>> >> 
>>>>    plot (1:10)
>>>> 
>>>> >> 
>>>>    print test.pdf
>>>> 
>>>> >> 
>>> > 
>>> > 
>>> Could you make this more explicit?  Is there a single script that we could 
>>> just try?
>>> 
>>> > 
>>> In particular, how to do: 
>>> 
>>> > 
>>> add `'disp("__go_close_all__")'  to __go_close_all__, create the my 
>>> foobar.m function add type `atexit ("foobar")' at the command line,
>>> 
>>> > 
>>> > 
>>> If I can figure it out I will give it a try.  I think what you found in 
>>> drawnow is important.
>>> 
>>> > 
>>> > 
>>> Michael
>>> 
>>> > 
>> Sorry, no script.
>> 
>> (1) please edit __go_close_all__.m and add `disp ("__go_close_all__")' to 
>> the end.
>> 
>> (2) create a new file/function called foorbar.m tjhat contains the lines ...
>> 
>>      function foobar ()
>>        disp ("Bye World")
>>        pause ()
>>      endfunction
>> 
>> Both foobar.m and the modifiied __go_close_all__.m should be in the current 
>> directory when octave is run.
>> 
>> (3) run octave, and at the command line type ....
>> 
>>      atexit ("foobar")
>>      exit
>> 
>> What happens? You should get "Bye World" followed by a pause. After you hit 
>> <return>, you should get "__go_close_all__"
>> 
>> (4) run octave and at the command line type ...
>> 
>>      atexit ("foobar")
>>      close all
>>      backend fltk
>>      plot (1:10)At (3) I got what you said above.
>>      print test.pdf
>> 
>> What happens? In this case, I get nothing reported to the command line and 
>> the file "test.pdf" is created.
>> 
>> Given Dimitri's comments, in your case, I assume the functions registered to 
>> be called when Octave exists will be run.
>> 
>> Ben
>> 
>>      
>> 
> I did these steps on my local machine and got:
> At (3) I got what you said above.
> At (4) I got:
> octave:1> atexit("foobar")
> octave:2> close all
> octave:3> backend fltk
> octave:4> plot(1:10)
> octave:5> print test.pdf
> octave:6> quit
> 
> Bye world
> __go_close_all__
> =========================================
> And, the plot is correct.
> 
> Then I did the same thing after ssh to another machine (so now all the 
> plotting has to
> go through X11/ssh to show up on my local screen).  In this case I got the 
> same for (3)
> but (4) gives:
> octave:1> atexit("foobar")
> octave:2> close all
> octave:3> backend fltk
> octave:4> plot(1:10)
> octave:5> print test.pdf
> GPL Ghostscript 8.71: Unrecoverable error, exit code 1
> warning: print.m: ghostscript failed to convert output to file 'test.pdf'.
> No such file or directory
> warning: print.m: failed to delete temporay file, '/tmp/oct-1QhiPo.eps'.
> octave:6> quit
> 
> Bye World
> __go_close_all__
> ========================================
> And, the plot is empty, of course.
> 
> Michael
> 
> And, the plot screen is black.
> 
> This is with Shai's latest patch.  But, none of the experimental code that
> we treid yesterday.
> 
> Michael

Thanks, I see no reason why Dimitri encountered an error in __go_close_all__. 
Anyone?

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]