Ggplot不能与历史数据库一起运行

时间:2017-06-06 17:41:12

标签: r plot ggplot2

我正在尝试使用ggplot绘图但是它出错了:

数据库:

enter image description here

      date_1 <- as.POSIXct(c("2016-01-01"))
      p <- ggplot(historico_numeros_eurusd_3[historico_numeros_eurusd_3$data_ajustada > date_1,], aes(x = `data_ajustada`, y = `BRL/EUR-Venda`))
      d <- p + #geom_line(data = eia_list_df[eia_list_df$date>date_2,], aes(date, value), stat = "identity", colour="#CC0000", size = 1, linetype = "dashed") +
      geom_bar(data = historico_numeros_eurusd_3[historico_numeros_eurusd_3$data_ajustada > date_1,], aes(data_ajustada, `BRL/EUR-Venda`), stat = "identity", colour = "#003399", size = 1) +
ylab("EUR/BRL") + scale_x_datetime(labels = date_format("%y/%m"))

绘制图像:

enter image description here

你可以帮帮我吗?

0 个答案:

没有答案