octave-maintainers
[Top][All Lists]
Advanced

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

Re: figure positioning problem


From: Ben Abbott
Subject: Re: figure positioning problem
Date: Sat, 19 Nov 2011 15:55:58 -0500

On Nov 19, 2011, at 3:25 PM, Michael Goffioul wrote:

> On Sat, Nov 19, 2011 at 7:42 PM, Ben Abbott <address@hidden> wrote:
> 
>> With this change the problem I mentioned earlier with printing from a script 
>> is greatly improved. The only remaining problem is that when I run the 
>> script below ...
>> 
>>        clear all
>>        v = version;
>>        dpi = round (get (0, "screenpixelsperinch"));
>>        paperposition = get (0, "defaultfigurepaperposition");
>>        position = get (0, "defaultfigureposition");
>>        position(3:4) = paperposition(3:4) * dpi;
>>        for backend = {"gnuplot", "fltk"}
>>          close all
>>          graphics_toolkit (backend{1});
>>          figure (1, "position", position)
>>          plot (rand (2))
>>          set (gca, "activepositionproperty", "position")
>>          axis ([1, 2, 0, 1])
>>          print (sprintf ("-r%d", dpi), sprintf ("Octave-%s-%s.png", v, 
>> backend{1}))
>>          drawnow
>>        endfor
>> 
>> ... the height of the FLTK result is off by the height of the status bar, 
>> but when I then create a second image from the command line ...
>> 
>>        print -r100 test_r100.png
>> 
>> ... everything is ok (the FLTK result matched gnuplot).
> 
> My guess is that the FLTK backend associate the position property with
> the internal size (excluding title bar and window border) of the main
> container in the figure window, but that container also includes the
> status bar.
> 
> Michael.

Any thoughts as to why the result from a script is different than from the 
command line?

Ben


reply via email to

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