help-octave
[Top][All Lists]
Advanced

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

Re: Feature request.


From: James Sherman Jr.
Subject: Re: Feature request.
Date: Tue, 22 Sep 2009 17:44:49 -0400

I believe that this is/was a problem with gnuplot rather than with octave, but I believe that this has been fixed in the most recent version.

http://www.nabble.com/gnuplot--%3E-octave-communication-of-figure-position-to21736426.html#a21736426
http://www.nabble.com/-changeset--figure-position-property-support-for-gnuplot---x11-to21260890.html#a21260890
http://www.nabble.com/gnuplot%2C-figure.position%2C---the-moving-window-to22069067.html#a22069067
http://www.nabble.com/Figure-Position-to24790735.html#a24790735

I can't test it currently, but this is what I found from a quick search of the archives.

On Tue, Sep 22, 2009 at 12:44 PM, George Barrick <address@hidden> wrote:
Subject: feature request.

                           2009.09.22.12:15:56 EDT

Hello GNU Octave folks,

     I'd like to request that the 'position' property
of figure() windows be implemented in Octave.

     I typically like to have fine control over the
diagrams that I exhibit for my students.  I _can_ get
control over the proportions of the graphing window
with print statements like:

print -djpeg "-S384,384" f44posn.jpg ;

in my octave scripts.  However, it would be nice if
the X11-display of the graph precisely mimicked the
print output whenever I demand of the octave-interpreter
a window having particular proportions.

    With my current set-up:

    WinXP Pro. SP3 ver. 5.1 build 2600
    CygWin 1.7.0-61
    Xorg-x11 1.6.3-1
    Octave 3.2.3-1
    Gnuplot 4.2.4-1

the octave-interpreter ignores me when I set the
'postion' property of my figure().  It always creates
an x11-window that is 640x480.

    If this is already done in the octave-3.3 development,
forgive my ignorance.  I haven't had time to keep up
with the development code in the mercurial repository.

    Anyone who is interested in such a feature can
see whether this behavior is reproduced on their local
set-up.  At the end of this post is my script for
a parabola where I ask octave to create a square window.
Note that the statement in my script:

set( kdle,'NextPlot','add')                     ;

is important.  If I run the script without that line,
octave seems to re-spawn the axes upon further graphics
calls, and does whatever it pleases with the figure and
axis properties.

Thanks,

George                         address@hidden
                              http://www.gbarrick.net


% <file: fall44.m>
%********D%********D%********D%********D%********D%********D%********D%*
%%  Set up graphing parameters.  Set vectors that state
%%    window position and size.

winXst     =  256 ;
winYst     =  256 ;
winWdt     =  256 ;
winHgt     =  256 ;

winPos  = [ winXst winYst winWdt winHgt ] ;

%********D%********D%********D%********D%********D%********D%********D%*
%%  Set the vector that gives area inside the window where
%%    axes will be drawn. All locations are stated relative
%%    to the window position.  Use window width and height
%%    as denominators.

win    = [ winWdt winHgt winWdt winHgt ] ;

plotWdt     =   210     ;
plotHgt     =   210     ;
plotXst     =    38     ;
plotYst     =    38     ;

plotPos     =  [ plotXst plotYst plotWdt plotHgt ] ./ win ;

%%  Set limits for the axes.

xlims    =      [  0.00, 2.10 ] ;
ylims    =      [  0.00, 2.10 ] ;

%********D%********D%********D%********D%********D%********D%********D%***f**
%%  The graphics functions figure() and axes() are called using
%%    the settings previously written up.  Use "hdle" as the graphics
%%    handle for the figure window.

hdle = figure()                 ;
set( hdle,'Position',winPos )   ;

%% Spawn axes first, then re-configure them.
kdle = axes() ;
set( kdle,'Position',plotPos )                  ;
set( kdle,'XLim',xlims,'YLim',ylims )           ;
set( kdle,'NextPlot','add')                     ;

%%  Create the axis labels.

kt3 = xlabel( 'x(t)' )                          ;
ku3 = ylabel( 'y(t)' )                          ;

%%  Create the graph.

xrow  = [  0.00 : 0.02 : 0.62  ] ;
xvals = [  xrow , 2*sqrt(5)/7  ] ;

wunz  = ones( size( xvals ) )    ;

gee   =  9.80                    ;

yvals = ( -0.5 * gee * ( xvals.^2 )) + ( 2.0 * wunz ) ;

l1    = plot( xvals, yvals, 'k-' );
set(l1,'LineWidth',2) ;


hndle = [ hdle; kdle; kt3; ku3; l1 ];

%% print -djpeg "-S384,384" f44posn.jpg;
%</file>


_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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