Re: Position of title changes in each loop. Why?



"bluesaturn[at]kellnerweg.de" <bluesaturn@xxxxxxxxxxxxx>
wrote in message
<17992658.1206526473380.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>...
I have to plot several figures. For each loop the same
plotfunction is called. So I expect titleposition to be the
same for each graph after plotting.
I use

titleobject=title(titleinfo,'Interpreter','none','fontname','helvetica','fontsize',19,'fontweight','demi');
%adjust title
titleposition=get(titleobject,'Position');
set(titleobject,'Position',[titleposition(1)
titleposition(2)+0.05 titleposition(3)]);

to shift the title each time a little.
But after six iterations the title is complete out of the
figure. I don't understand why.
Also, the titleposition for each plot is not the same
than the previous one.
The position of the axes etc. are always the same.
Despite this fact, the title is still moving upwards.
Has anybody an explanation for this strange behaviour?
I tried to clean the titleposition after changing but
this was in vain.
Kind regards,
Gudrun


You are shifting the title slightly up in each iteration.
Of course it will eventially drift out of the figure.

I assume you are plotting on the same axis in each loop.
title function only updates the existing title object and
the position will remain what you have set on last
iteration, thus drifting up all the time.
You only need to shift it once. Other quick fixes would be
to delete the title object in each iteration:
delete(titleobject), then title will create a new one at
the default location. Or clf will do also.

.



Relevant Pages

  • Re: bit operations and parity
    ... Only one shift is needed per iteration, so there are no questions about whether the processor has a barrel shifter. ... exercise for the reader. ... (Extending it to float and double is left ...
    (comp.lang.java.programmer)
  • Re: circular shifting a vector/matrix - Problem
    ... corrCoef = zeros(1, numColMatrix01); ... for shiftSize = 1:numColMatrix01, ... Are you sure you want to shift like this (iteration 1, 1 shift, ...
    (comp.soft-sys.matlab)
  • security considerations for: set x dir/[*] dir/*
    ... The following steps for the iteration are: ... contents of $is under the control of an attacker (and this shell ...
    (comp.unix.shell)
  • Re: bit operations and parity
    ... Mayeul wrote in ... The table could be computed offline and stored in the source code, ... for the shift at the end of each iteration. ...
    (comp.lang.java.programmer)
  • Re: convergence of QR-algorithm
    ... >Bill, yes I'm doing all of that., alongside using a shift that is the ... In either case the bottom two elements below the diagonal should ... >the one I'm using as it involves more calculation at each iteration. ... >case convergence could never occur. ...
    (sci.math.num-analysis)