[R] Move the main titel to the left of the plot
markm0705
markm0705 at gmail.com
Thu Sep 15 10:56:52 CEST 2011
Dear R helpers
I wish to move the main title, which appears on a dotplot to be right
aligned with the left axis. Is there are parameter associated with dotplot
'main' that allows the title to be placed where I want it?
Code snippet relating to dotplot is below.
with(Cal_dat,
dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt,
fill_var = Commodity,
pch_var = factor(Year),
xlab_var = factor(Company),
pch = c(21, 22, 23),
cex=sym.siz,
col = "black",
fill = col.pat,
alpha=0.6,
legend = list(inside = list(fun = mkey,corner = c(0.97, 0.06))),
scales = list(x = list(log = 10)),
xscale.components = xscale.components.log10ticks,
origin = 0,
type = c("p","a"),
main = "Mineral resources",
xlab= "Total tonnes (billions)",
panel = function(x, y, ..., subscripts,
fill, pch, fill_var, pch_var) {
pch <- pch[pch_var[subscripts]]
fill <- fill[fill_var[subscripts]]
panel.ablineq(v=log(ave_dat[1,2]),col="grey60", lty=1, rotate=
TRUE,label="2002", at=0.40)
panel.ablineq(v=log(ave_dat[2,2]),col="grey60", lty=1, rotate=
TRUE,label="2009", at=0.50)
panel.ablineq(v=log(ave_dat[3,2]),col="grey60", lty=1, rotate=
TRUE,label="2010", at=0.60)
panel.dotplot(x, y, pch = pch, fill = fill, ...)
}))
--
View this message in context: http://r.789695.n4.nabble.com/Move-the-main-titel-to-the-left-of-the-plot-tp3815027p3815027.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list