短时间间隔内的值太多

时间:2019-12-27 19:07:20

标签: r ggplot2

我想按时间间隔绘制股票价格,但短时间间隔内的值太多,这是数据和曲线图

我该如何解决?

> head(df)
# A tibble: 6 x 5
  Order_time          Best_Bid mid_price  spread Best_Ask
  <dttm>                 <dbl>     <dbl>   <dbl>    <dbl>
1 2018-03-01 09:40:01     11.7      11.7 0.01000     11.7
2 2018-03-01 09:40:02     11.7      11.7 0.01000     11.7
3 2018-03-01 09:40:02     11.7      11.7 0.01000     11.7
4 2018-03-01 09:40:02     11.7      11.7 0.01000     11.7
5 2018-03-01 09:40:03     11.7      11.7 0.01000     11.7
6 2018-03-01 09:40:03     11.7      11.7 0.01000     11.7

情节代码

ggplot() + geom_line(df,mapping = aes(x=df$Order_time,y=df$Best_Bid))

PLOT

0 个答案:

没有答案