Skip to content
Prev 320546 / 398506 Next

changing y-axis intervals in a boxplot

Thank you Pascal but unfortunelately i still didn't figure out how to change the numbers presented at the y-axis.

I looked up your suggestions but if I'm right, yaxt can set if the axis is presented (yaxt="s") or suppressed (yaxt="n") which does not help for changing the values on the y-axis.

The 'at' argument did solve my problem but in a clumsy way. Although I'm happy that I managed, does anyone know how to do the same job in a more convenient way?

This is the 'clumsy' code I used:

boxplot((fitted(finalfit4) *100) ~ instabilitydata2$MRI_Diag_Instab_rev, ylim=c(0,100), xlab="MRA diagnosis", ylab="Predicted probability (%)")
axis(side=2, at="10")
axis(side=2, at="30")
axis(side=2, at="50")
axis(side=2, at="70")
axis(side=2, at="90")

Kind regards, 

Tobias

-----Oorspronkelijk bericht-----
Van: Pascal Oettli [mailto:kridox at ymail.com] 
Verzonden: vrijdag 29 maart 2013 8:44
Aan: Berg, Tobias van den
CC: 'r-help at r-project.org'
Onderwerp: Re: [R] changing y-axis intervals in a boxplot

Hello,

?par (particularly the 'yaxt' argument)
?axis ('side' and 'at' arguments)

Hope this help,
Pascal
On 29/03/13 16:37, Berg, Tobias van den wrote: