From: Jos Reulen on
using subplot i make for example 4 plots
i would also put several computed vaklues 9mean, min, max,...etc) on the same page before plotting it on paper
i could use the text command to position each line filled with numers and text
however, this seesm to me a rather clumsy way of doing.
does anyone know a solution to efficiently combine figure plots and computed variables onto the same page ?
From: Andrés Suárez on
On 12 ago, 15:03, "Jos Reulen" <jphreu...(a)hotmail.com> wrote:
> using subplot i make for example 4 plots
> i would also put several computed vaklues 9mean, min, max,...etc) on the same page before plotting it on paper
> i could use the text command to position each line filled with numers and text
> however, this seesm to me a rather clumsy way of doing.
> does anyone know a solution to efficiently combine figure plots and computed variables onto the same page ?

You can use the title of each plot (see 'title') or the name of the
figure (see property 'Name' of 'figure').

Regards,
Andrés
From: Jos Reulen on
Andrés Suárez <ansuga(a)gmail.com> wrote in message <135337e8-64be-4b00-a9bb-d3a69b684edf(a)l20g2000yqm.googlegroups.com>...
> On 12 ago, 15:03, "Jos Reulen" <jphreu...(a)hotmail.com> wrote:
> > using subplot i make for example 4 plots
> > i would also put several computed vaklues 9mean, min, max,...etc) on the same page before plotting it on paper
> > i could use the text command to position each line filled with numers and text
> > however, this seesm to me a rather clumsy way of doing.
> > does anyone know a solution to efficiently combine figure plots and computed variables onto the same page ?
>
> You can use the title of each plot (see 'title') or the name of the
> figure (see property 'Name' of 'figure').
>
> Regards,

% here is an example of the solution
function plotWithTextBox()
data = rand( 100, 5 );

f = figure( 'Name', 'Test-Figure containing a textbox' );
subplot( 6, 1, 1 );
plot( data( :, 1 ) );
title( 'title 1' );
subplot( 6, 1, 2 );
plot( data( :, 2 ) );
title( 'title 2' );
subplot( 6, 1, 3 );
plot( data( :, 3 ) );
title( 'title 3' );
subplot( 6, 1, 4 );
plot( data( :, 4 ) );
title( 'title 4' );
subplot( 6, 1, 5 );
plot( data( :, 5 ) );
title( 'title 5' );

% I want the textbox to be positioned like a subplot. Therefore create here
% an extra subplot without plotting data just to get the postion of that
% subplot.
% Deleting this subplot is important, otherwise the subplot would be
% visible behind and around the textbox.
sp = subplot( 6, 1, 6 );
pos = get(sp,'position');
delete(sp);

% Create a cell-array of chars, each cell will be printed in one line of
% the textbox.
textToDisplay = { 'first line', 'second line', '...' };

% Add the textbox to the plot.
annotation( f, 'textbox', pos, ...
'String', textToDisplay, ...
'FitBoxToText', 'off' );

% This option advises Matlab to use the full height of a paper, when
% printing the figure. The effect is only visible in the printed version,
% not in the figure itself.
orient( 'tall' );

% Print the figure to a pdf-file (A pdf-printer must be installed, but
% I am not sure whether this works always out of the box, if this
% requirement is fullfilled.)
% You can specifiy more options, see 'print' in Matlab-help.
% You can also specifiy other printers like the one you are always using.
%
% fileName = '/home/dala/doc/unimaas/master_thesis/BsTools/data/test.pdf';
% print( '-dpdf', fileName );


end % function



> Andrés
From: recentes on
You can try creating a GUI .