Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress ticks in plot in r

I want to remove labels and axis from X axis, however adding new ticks.

plot(1:10, ylab = "") at1 <- seq(1, 10, 0.1) axis(side = 1, at = at1, labels = FALSE) 

I could not get rid of y labels.

like image 860
SHRram Avatar asked May 01 '12 03:05

SHRram


People also ask

How do I remove tick marks in R?

Option 1. Set xaxt = "n" and yaxt = "n" to remove the tick labels of the plot and add the new labels with the axis function. Note that the at argument sets where to show the tick marks.

How do I suppress axis in R?

If you are going to create a custom axis, you should suppress the axis automatically generated by your high level plotting function. The option axes=FALSE suppresses both x and y axes. xaxt="n" and yaxt="n" suppress the x and y axis respectively.

How do I remove axis labels in R?

Data Visualization using R Programming When we create a plot in R, the Y-axis labels are automatically generated and if we want to remove those labels, the plot function can help us. For this purpose, we need to set ylab argument of plot function to blank as ylab="" and yaxt="n" to remove the axis title.

How do you hide Xticks?

xticks([]) method to invisible both the ticks and labels on the x-axis and set the ticks empty. plt. yticks() method to invisible both the ticks and labels on the y-axis and set the ticks empty. In last, we use the show() method to display the graph.


1 Answers

see ?par You need the xaxt argument

plot(1:10, ylab = "", xaxt='n') 
like image 74
GSee Avatar answered Sep 19 '22 13:09

GSee