Add Axes to Plot Using axis Function in R (4 Examples) | Modify Ticks & Labels | Change Text & Value

preview_player
Показать описание
R code of this video:

plot(1:100) # Default plot

plot(1:100, # Plot without axes
xaxt = "n",
yaxt = "n")
axis(side = 1, # Draw x-axis
c(0, 25, 50, 75, 100))
axis(side = 2, # Draw y-axis
c(10, 50, 90))

plot(1:100, # Plot without axes
xaxt = "n",
yaxt = "n")
axis(side = 3, # Add axis on top
c(0, 25, 50, 75, 100))
axis(side = 4, # Add axis on right side
c(10, 50, 90))

plot(1:100, # Plot without axes and borders
axes = FALSE)
axis(side = 1, # Add x-axis
c(0, 25, 50, 75, 100))
axis(side = 2, # Add y-axis
c(10, 50, 90))

Follow me on Social Media:

Рекомендации по теме
Комментарии
Автор

Can you please share whether the same process can help us add the axis under the R command of 'plotOverall'

souritdas
Автор

Nice presentation. I believe I have suggested this before but to make the axis label look nicer one can add 'las = 1'. That makes the y axis label (on either side) show up horizontally and thus more readable.

haraldurkarlsson
Автор

Could you teach us how to draw a continuum graph (a graph showing a degree of something)?

learn
welcome to shbcf.ru