axes=FALSE
, then these functions could be used for axes below or to
the left of the plot as well.power.axis(power, base=exp(1), side=c("right", "above", "left", "below"),
at, grid=FALSE, grid.col=gray(0.5), grid.lty=3,
axis.title="Untransformed Data", cex=1, las=par("las"))
box.cox.axis(power, side=c("right", "above", "left", "below"),
at, grid=FALSE, grid.col=gray(0.5), grid.lty=3,
axis.title="Untransformed Data", cex=1, las=par("las"))
prob.axis(at, side=c("right", "above", "left", "below"), grid=FALSE, grid.lty=3,
grid.col=gray(0.5), axis.title="Probability", interval=0.1, cex=1, las=par("las"))
side = 1
for the bottom of the plot,
side=2
for the left side,
side = 3
for the top, side = 4
for the right side.TRUE
grid lines for the axis will be drawn.0
, ticks labels are drawn parallel to the
axis; set to 1
for horizontal labels (see par
).power.axis
when power = 0
.at
argument.box.cox
, logit
data(UN)
UN<-na.omit(UN)
attach(UN)
par(mar=c(5, 4, 4, 4)+.1)
plot(log(gdp, 10), log(infant.mortality, 10))
power.axis(0, base=10, side="above",
at=c(50,200,500,2000,5000,20000),grid=TRUE, axis.title="GDP per capita")
power.axis(0, base=10, side="right",
at=c(5,10,20,50,100), grid=TRUE, axis.title="infant mortality rate per 1000")
plot(box.cox(gdp, 0), box.cox(infant.mortality, 0))
box.cox.axis(0, side="above",
grid=TRUE, axis.title="GDP per capita")
box.cox.axis(0, side="right",
grid=TRUE, axis.title="infant mortality rate per 1000")
qq.plot(logit(infant.mortality/1000))
prob.axis()
qq.plot(logit(infant.mortality/1000))
prob.axis(c(.005, .01, .02, .04, .08, .16))
Run the code above in your browser using DataLab