The y axis label and the y axis tickmarket overlap in the following graph. I would like them to not overlap. I have play with the par() margins but that doesnt solve the problem.
My code looks as follow. I attache a picture of how the graph looks now.
par(mfrow = c(1,1), mar = c(6, 4, 3, 1), cex.axis = 3, lwd = 5)
# Create the percent stacked barplot
barplot(
t(US_plot),
beside = FALSE,
col = c("skyblue", "orange", "green"),
#legend.text = colnames(US_plot),
args.legend = list(x = "bottom", inset = c(0, -0.19), bty = "o", horiz = TRUE),
xlab = NULL,
legend.text = c("Cash", "Other", "Stock"),
ylab = "Hundred of millions",
main = "Financing sources of M&A deals",
cex.axis =3,
cex.lab = 2,
cex.main = 3,
yaxt = 'n'
)
axis(2, at = seq(0, 350000000, by = 50000000), labels = seq(0, 3.5, by = 0.5), las = 1, cex.axis = 3)
grid(nx = NULL, ny = NULL, col = "gray", lty = "dotted", lwd = 3)