0 votes
1 view
in R Programming by (6.5k points)

I was just wondering if there is a way to get rid of axis values, either the x-axis or y-axis respectively, in an r-plot graph.

I know that axes = false will get rid of the entire axis, but I would only like to get rid of the numbering.

1 Answer

0 votes
by (25.3k points)

To remove x and y-axis values use xaxt="n" and yaxt="n"  that suppress the x and y-axis respectively.

For example:

For the plot below:

        

data(mtcars)

plot(x= mtcars$mpg,y=mtcars$cyl)

image

To remove x and y-axis values:

plot(x= mtcars$mpg,y=mtcars$cyl, xaxt='n')

plot(x= mtcars$mpg,y=mtcars$cyl, yaxt='n')

Outputs:

image
image

Related questions

0 votes
1 answer
+1 vote
2 answers
asked Jul 10, 2019 in R Programming by Ajinkya757 (5.3k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...