|
From: Ben A. <bpa...@ma...> - 2009-02-12 13:08:33
|
On Feb 12, 2009, at 2:28 AM, Petr Mikulik wrote:
>> Control over window size and position via its scripting language is
>> something
>> Matlab does. Compatibility with Matlab is a goal for Octave. Of
>> course, there
>> user controls the scripting language, so there should be no
>> surprises for the
>> user. In the event a script places a window and the user then moves
>> it (via
>> the mouse), the window is intended to stay where the mouse placed
>> it (unless
>> the user moves it again by using the mouse or a script).
>>
>> The properties all have defaults, which may be modified via
>> Octave's scripting
>> language. The size and position of the figure are special in that
>> they may be
>> modified by either the scripting language of the mouse.
>
> I think it is very useful to have the option in Octave to position the
> window at an explicit position. In one my application, I draw 4
> images on
> screen. I would really wish they are created on screen always at the
> same
> position (and in the same order), so that I'm not confused. Window
> manager
> would put them automatically ("randomly") at positions where he
> thinks there
> is enough space.
>
> We all agreed here that Octave should pass these positions to
> gnuplot only
> if they were really changed by user.
>
> But I wonder how to achieve this...
> plot(1:10)
> f=gca
> set(f, 'position', [1 1 300 300])
>
> => crazy plot appears. According to log by "drawnow()", Octave is
> asking for
> set origin 1, 1;
> set size 300, 300;
> instead of changing numbers in "set term x11 .... size ...
> position ...".
> So, how do you actually change the position of x11 windows?
Do I infer correctly that you expect "set origin" and 'set size" to
change the position and size of the window? If my understanding is
correct, that use to be the case for *some* canvases, but no longer
does that. For version 4.3, "set origin" and "set size" are used to
position each plot on the canvas.
For compatibility with Matlab, and for 2D plots, Octave will likely
use the "set bmargin/lmargin/rmargin/tmargin" commmands, as these give
explicit control of the axes (i.e. plot area sans the tick labels and
axes labels).
> Further,
> set(f, 'tickdir', 'out')
> works OK but
> set(f, 'ticklength', [10 10])
> is ignored. Can you please fix it?
I'm happy to patch octave's sources if you can tell me what gnuplot
commands are needed to change the ticklength.
> Also, Matlab uses capitalization, e.g.
> TickDir
> which looks better readable in "get(f)" compared to Octave's
> minuscules.
This is deliberate. Avoiding CamelCase is part of Octave's coding
standard. However, the property names are case-insensitive in both
Octave and Matlab. If compatibility were not important, the property
names would have been "tick_dir".
Ben
|