## Replace X-Axis Values in R (Example) | How to Change & Customize Ticks of Axes | axis() Function

#### Sharing buttons:

hi this is Yahoo for statistics Kokomo

and in this video I will show you how to

replace the x-axis values of a plot in

the r programming language so in the

video I'm going to show you an example

and this example is based on the example

plot that we can create with a line two

of the code so if you run this line of

code you will see that at the bottom

right of our studio simple plot is

returned which is showing five values in

a scatter plot and as you can see our

x-axis is containing the values 1 to 5

so if you want to create a plot with

manually specified x-axis values then we

first need to create this plot again

without any excess values and this is

what we can do in lights

4 to 6 of the code and as you can see in

line 5 of the code I am specifying the X

X argument to be equal to the character

letter n so if you run these three lines

of code you will see that at the bottom

right in our studio our plot is for

eight it again this time without any

excess values and with the XS label my x

axis so in the next step we are applying

the axis function that you can see in

line 8 of the code and within the X's

function we need to specify the position

at which we want to specify the Nexus so

if you specify the value 1 then this

means that we are specifying the x axis

then we need to specify the positions at

which we want to add our new x axis

labels and then we need to specify the

new labels that you want to add so in

this case we are simply using the

letters ranging from a to e so if you

run line 8 to 10 of the code you will

see that our plot is updated again and

this time our plot is showing the axis

values a B

C D and E so in this video you have to

learn how to change the x-axis values of

a base our plot in the r programming

language however in case you want to

published a tutorial in which i'm

explaining the content of this video in

some more detail and furthermore if you

have liked the video i would be very

happy if you leave me some positive

feedback in the comments and make sure

to subscribe to my youtube channel in

order to get notifications in future

when i'm releasing new videos to the

channel that's it for this video thanks

a lot see you next time