R语言ggplot画图入门

工具:R+ggplot2工具包 ggplot画图比较简单就直接上代码了   library(ggplot2) #加载工具包 mtcars #使用R的数据集   plot(mtcars$mpg,mtcars$drat) #将mpg和drat按照(x,y)做散点图 plot(mtcars$mpg,mtcars$drat,type = ‘b’) #将mpg和drat按照(x,y)做线图,  其中,typ
相关文章
相关标签/搜索