Placing the grid along date tickmarks

前端 未结 4 1416
情歌与酒
情歌与酒 2021-01-18 08:31

I have the following data:

x=strptime(20010101:20010110)
y=1:10
z=data.frame(x,y)

So my data is this:

            x  y
1  2         


        
4条回答
  •  天命终不由人
    2021-01-18 08:42

    I'm not familiar with the intricacies of the base plots. But, ggplot does this effectively.

    x <- strptime(20010101:20010110, format='%Y%m%d')
    y <- 1:10
    z <- data.frame(x, y)
    qplot(x,y,data=z,'point')
    

提交回复
热议问题