Code for type=“h” in ggplot2

后端 未结 3 354
再見小時候
再見小時候 2021-01-18 08:29

This may sound really simple but I\'m trying to find the equivalent code to plot(x,y, type=\"h\") as a qplot code. I already have:

qplot(x,y,         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 09:11

    With ggplot you only need a data frame with a vector of observations, not the count for each value.

    ggplot(data, aes(x = x)) + geom_histogram()
    

提交回复
热议问题