Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Any easy ways to numbering subplots ?

Subject: Any easy ways to numbering subplots ?

From: Kuo-Hsien

Date: 18 Jan, 2010 18:02:39

Message: 1 of 3

Hi,

I'm wondering that there are some easy ways to put (a), (b), (c) and (d) in the corner of subplot (2,2,1), subplot (2,2,2), subplot (2,2,3) and subplot (2,2,4)?

Thanks,
Michael

Subject: Any easy ways to numbering subplots ?

From: Matt Fig

Date: 18 Jan, 2010 18:11:07

Message: 2 of 3

For example:


for ii = 1:4
    subplot(2,2,ii)
    text(-.15,1.05,['(',char(ii+96),')'],...
        'color','r',...
        'fontw','b')
end

Subject: Any easy ways to numbering subplots ?

From: TideMan

Date: 18 Jan, 2010 19:04:40

Message: 3 of 3

On Jan 19, 7:11 am, "Matt Fig" <spama...@yahoo.com> wrote:
> For example:
>
> for ii = 1:4
>     subplot(2,2,ii)
>     text(-.15,1.05,['(',char(ii+96),')'],...
>         'color','r',...
>         'fontw','b')
> end

or to get the labels inside:
for ii = 1:4
    subplot(2,2,ii)
    text(1,1,['(',char(ii+96),') '],...
        'HorizontalAlignment','right',...
        'VerticalAlignment','top',...
        'color','r',...
        'fontw','b')
end

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us