help-octave
[Top][All Lists]
Advanced

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

Re: Figure Position


From: Kristen Richter
Subject: Re: Figure Position
Date: Thu, 13 Aug 2009 08:57:41 -0700 (PDT)

I have upgraded from 3.2.0 to octave 3.2.2 and am running gnuplot-x11 4.5.4-6 
in ubuntu.

However, even after trying the example below, I'm having the same sort of 
problem, where new figures appear just below my command window, to the side of 
my command window, to the side and bottom of my command window, and then tiled 
with my command window, no matter what numbers I put in the [left bottom width 
height] matrix for 'Position'. (See example below)

octave:2> figure(1,"position",[5,5,400,400])
octave:3> figure(2,"position",[5,5,400,400])
octave:4> figure(3,"position",[5,5,400,400])
octave:5> figure(4,"position",[5,5,400,400])
octave:6> get(figure(1),'Position')
ans =

     5     5   400   400

octave:7> get(figure(2),'Position')
ans =

     5     5   400   400

octave:8> get(figure(3),'Position')
ans =

     5     5   400   400

octave:9> get(figure(4),'Position')
ans =

     5     5   400   400


While querying 'Position' with the get command returns the input I gave, this 
is obviously not occurring.

Has anyone else come across this issue? Have I changed some global variable in 
octave? Why would uninstalling and reinstalling octave not have restored global 
defaults? What else could be overriding my 'Position' inputs?

Any help on this issue would be appreciated.

Thanks,
Kristen



----- Original Message ----
From: Ben Abbott <address@hidden>
To: Kristen Richter <address@hidden>
Cc: address@hidden
Sent: Monday, August 3, 2009 6:58:31 PM
Subject: Re: Figure Position


On Aug 3, 2009, at 9:20 AM, Kristen Richter wrote:

> Hello all,
> 
> I am attempting to apply the position property to several figures in order 
> them to tile them across the screen.  After reading the online Matlab
> manual, it seems like the appropriate commands are
> 
> figure('Position',[left bottom width height])
> or even set(figure(#),'Position',[left bottom width height])
> 
> However, using these commands in Octave only produces a figure that 
> auto-tiles with my command window.  When I query get(figure(#),'Position'), I 
> get my input back, as if the figure created was actually at this position. 
> And I've double-triple-checked the units I'm using.
> 
> Once, in my harried quest to get this working, I managed to change the offset 
> of the auto-tiling, but reviewing over my command history, I cannot seem to 
> reproduce this.
> 
> I've spent some time searching wikis for problems other people have posted 
> and reading a little over the archives (since Jan-09) of this mailing list 
> and haven't found anything similar to what I am experiencing, though I 
> understand that Octave and gnuplot may be unaware of any resizing or change 
> in position that I do with my mouse.  I'm not sure if this is an area where 
> development for Octave hasn't reached, but the 'Position' property seems like 
> a commonly used handle.
> 
> Any light that could be shed on this situation would be greatly appreciated.
> And I'm running the latest version of octave, 3.2.0, compiled in Ubuntu 
> without arpack (couldn't get this working).
> 
> -Kristen

Hi Kristen,

Unfortunately, Octave's handle graphics are not yet fully compatible with 
Matlab. The figure position property is only partially compatible. To place the 
figure you need to be running gnuplot 4.2.5 or later and octave 3.2.x.

When creating a figure, you can set the figure's position by

    figure (h, "position", [xLL, yLL, width, height])

For example ...

    figure(1,"position",get(0,"screensize")([3,4,3,4]).*[0.1 0.2 0.8 0.7])

Once the plot stream to gnuplot is open, it is no longer possible to can the 
the figures position (unless someone wants to write the necessary code to 
communicate with x11).

Ben


      

Attachment: Screenshot.png
Description: PNG image


reply via email to

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