R ggplot2仅打印轴-不打印点
我有一个CSV文件,如:R ggplot2仅打印轴-不打印点,r,ggplot2,R,Ggplot2,我有一个CSV文件,如: date;foo 2016-07-01;0,54 2016-08-01;0,54 2016-09-01;0,50 2016-10-01;0,49 然后读入R并绘制 foo2 <- read.csv2("here") ggplot(foo2, aes(x=date, y=foo)) foo2您需要在绘图中添加几何图形。如果你想要一个线图添加 ggplot(foo2, aes(x=date, y=foo)) + geom_line() 如果你想要散点图 ggpl
date;foo
2016-07-01;0,54
2016-08-01;0,54
2016-09-01;0,50
2016-10-01;0,49
然后读入R并绘制
foo2 <- read.csv2("here")
ggplot(foo2, aes(x=date, y=foo))
foo2您需要在绘图中添加几何图形。如果你想要一个线图添加
ggplot(foo2, aes(x=date, y=foo)) + geom_line()
如果你想要散点图
ggplot(foo2, aes(x=date, y=foo)) + geom_point()
您可以找到更多几何图形。您需要在绘图中添加几何图形。如果你想要一个线图添加
ggplot(foo2, aes(x=date, y=foo)) + geom_line()
如果你想要散点图
ggplot(foo2, aes(x=date, y=foo)) + geom_point()
你可以找到更多的几何图形。向绘图添加一个geom
向绘图添加一个ggplot(foo2,aes(x=date,y=foo))+geom{foo}
foo=[point,line,bar,hist,…]
向绘图添加一个geom
向绘图添加一个ggplot(foo2,aes(x=date,y=foo))+geom{foo>其中foo,line,hist,]
add+geom_point()