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:
Inserting Text and Years in X Axis instead of Axis Numbers

Subject: Inserting Text and Years in X Axis instead of Axis Numbers

From: Prabu Selvaraj

Date: 11 Aug, 2011 16:50:25

Message: 1 of 2

How can i insert the text (eg.Jan,Feb) or years (eg.2009,2010) in the X-axis of the plotted graph. Do I have to create any file to execute the texts before plotting.

Subject: Inserting Text and Years in X Axis instead of Axis Numbers

From: Florin Neacsu

Date: 11 Aug, 2011 21:53:10

Message: 2 of 2

"Prabu Selvaraj" <vtprabu_since87@yahoo.co.in> wrote in message <j2118h$83n$1@newscl01ah.mathworks.com>...
> How can i insert the text (eg.Jan,Feb) or years (eg.2009,2010) in the X-axis of the plotted graph. Do I have to create any file to execute the texts before plotting.

Hi,

Try
>set(gca,'xtickLabel',{'a','b','asas','asaaaa','end'})

Have a look at axes properties for more details.

Regards,
Florin

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