|
"Dave Brackett" <davebrackett@hotmail.com> wrote in message <gn3lc9$j8g$1@fred.mathworks.com>...
> "DanF211 " <daniel.cromb@iop.kcl.ac.uk> wrote in message <gn3j8r$qdg$1@fred.mathworks.com>...
> > "Dave Brackett" <davebrackett@hotmail.com> wrote in message <gn3ftt$bh0$1@fred.mathworks.com>...
> > > "Hannes Bauer" <pixstamp@gmx.net> wrote in message <gn3a6p$juk$1@fred.mathworks.com>...
> > > > Hello!
> > > >
> > > > Is it possible to make a figure consisting of subplots with one title on top of all subplots instead of one title for each subplot?
> > > >
> > > > Regards,
> > >
> > >
> > > just title the top subplot, e.g.
> > >
> > > figure
> > > a=subplot(2,1,1)
> > > b=subplot(2,1,2)
> > > title(a,'title')
> >
> > That doesn't really work if there are four subplots because the title will be above the first one, i.e. on the left. It would be nice to have a way of putting the title at the top centre of the figure, regardless of the number/configuration of subplots.
>
>
> ok, you could use text(x,y,'string') to create a text string on the figure. just would need to get the x and y coordinates for positioning. You could link the x coordinates to the size of the figure window so that it is always in the middle.
actually, scrub that last comment, you can't use that as that only puts text within an axes, and while you could create an invisible axes the same size as the figure, it would probably be a bit of a pain.
however, there is this function on the file exchange called supertitle which should do what you want: http://www.mathworks.com/matlabcentral/fileexchange/3233
|