Я создал следующий график:
введите описание изображения здесь
Как вы можете видеть, первая метка по оси x не отображается на графике.
Код, который я использовал для создания изображения выше, следующий:
library(readxl)
dat <- as.matrix(dataset[,2:4])
dat2 <- as.matrix(dataset[, c(2, 5,6)])
tenors <- factor(c("EONIA 1d", "EURIBOR 3m", "IRS 2y", "IRS 5y", "IRS 10y"),
levels = c("EONIA", "EURIBOR 3m", "IRS 2y", "IRS 5y", "IRS 10y"),
ordered = T)
par(mfrow = c(1,2))
plot(1:5, dat[,1], type = "b", xaxt = "none", main = "Spot curve vs 4Q 20", xlab = "tenor", ylab =
"tasso %", pch = 19, lty = 1, lwd = 3, ylim = c(-0.6, 0.15))
axis(side=1, at = 1:5, labels = tenors, cex.axis = 0.5)
lines(1:5, dat[,2], col = "red", lty = 5)
lines(1:5, dat[,3], col = "blue", lty = 3)
legend("topleft", legend = c("curva spot 30/6/20", "tassi impliciti", "consensus"),
col= c("black", "red", "blue"), lty = 1:3, cex = 0.8)
plot(1:5, dat2[,1], type = "b", xaxt = "none", main = "Spot curve vs 2Q 21", xlab = "tenor", ylab =
"tasso %", pch = 19, lty = 1, lwd = 3, ylim = c(-0.6, 0.15))
axis(side=1, at = 1:5, labels = tenors, cex.axis = 0.5)
lines(1:5, dat2[,2], col = "red", lty = 5)
lines(1:5, dat2[,3], col = "blue", lty = 3)
legend("topleft", legend = c("curva spot 30/6/20", "tassi impliciti", "consensus"),
col= c("black", "red", "blue"), lty = 1:3, cex = 0.8)
Что мне не хватает?