Dear R-users, I'm a bit of a rooky in R and do not know how to change the y-axis intervals of a boxplot. The y-axis in my boxplot ranges from 0 to 100 which is fine. The problem is the interval level in between. Now it increases with steps of 20 but I'd like to have it changed by steps of 5. Anyone knows how to do this in R? I used the following code for producing this boxplot: boxplot((fitted(finalfit4) *100) ~ instabilitydata2$MRI_Diag_Instab_rev, ylim=c(0,100), xlab="MRA diagnosis", ylab="Predicted probability (%)") Kind regards, Tobias [[alternative HTML version deleted]]
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:> Dear R-users, > > I'm a bit of a rooky in R and do not know how to change the y-axis intervals of a boxplot. > > The y-axis in my boxplot ranges from 0 to 100 which is fine. The problem is the interval level in between. Now it increases with steps of 20 but I'd like to have it changed by steps of 5. > > Anyone knows how to do this in R? > > I used the following code for producing this boxplot: > boxplot((fitted(finalfit4) *100) ~ instabilitydata2$MRI_Diag_Instab_rev, ylim=c(0,100), xlab="MRA diagnosis", ylab="Predicted probability (%)") > > > Kind regards, Tobias > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
> -----Original Message----- > I'm a bit of a rooky in R and do not know how to change the > y-axis intervals of a boxplot. > ... > I used the following code for producing this boxplot: > boxplot((fitted(finalfit4) *100) ~ > instabilitydata2$MRI_Diag_Instab_rev, ylim=c(0,100), > xlab="MRA diagnosis", ylab="Predicted probability (%)")Add yaxp=c(0,100,20) to your boxplot call. See ?par for what this means. S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}