Mori
Mori

Reputation: 251

Put title on the topleft side of the plot

Is it possible to change the position of title "main" in bar plot?

I need to put the general title on the topleft side of plot.

DF.Rain.Sum <- c(1015, 1153, 1316, 1478)
Alt <- c(1350, 1700, 2000, 2300)

bplt <-barplot(DF.Rain.Sum  , main=" ",
    xlab="Sum of Rain (mm)", ylab="Altitude (m)", col=c("darkblue"), legend 
= rownames(Alt),beside=TRUE, names.arg=Alt , horiz=TRUE, xlim=c(0,2000), 
las=1)

title("a.", cex.main = 2,   font.main= 4, col.main= "blue")

Upvotes: 3

Views: 1048

Answers (1)

Florian
Florian

Reputation: 25385

Use the adj parameter:

title("a.", cex.main = 2,   font.main= 4, col.main= "blue", adj=0)

enter image description here

Upvotes: 2

Related Questions