I have to plot two continuous time series requiring separate scales for axis.
However, my code doesn't work:
ggplot()+
geom_line(t, mapping = aes(y = EMBIG, x = Date), colour = "blue")+
geom_line(t, mapping = aes(y = VIX, x = Date), colour = "red")+
scale_y_continuous(name = "EMBIG", breaks = NULL,
sec.axis = dup_axis(name = "VIX"))
Do you have any suggestion? Also outside ggplot is a solution