zoukankan      html  css  js  c++  java
  • R(week 8)

    library(ggplot2)
    library(tidyverse)
    
    mtcars
    dim(mtcars)
    head(mtcars)
    
    ?qplot
    qplot(data = mtcars, x = wt, y = mpg) +
      ggtitle(" sjdklfd skdjskfl  dsfs") + 
      theme(plot.title = element_text(hjust = 0.5)) + 
      xlab("x") + 
      ylab("y")
    
    grep("^geom", objects("package:ggplot2"), value = TRUE)
    
    qplot(mpg, wt, data = mtcars, color = factor(cyl),
      geom = c("point", "line"))
    qplot(mpg, wt, data = mtcars, color = cyl, 
          geom = c("point", "line"))
    p <- qplot(data = mtcars, x = wt, y = mpg, shape = factor(cyl)) +
      scale_shape_manual("Number of
     Clylinder", values = c(3, 5, 8)) +
      scale_color_manual(values = c("red", "blue", "green"))
    qplot(data = mtcars, x = wt, y = mpg, color = factor(gear)) +
      #facet_grid(gear~.)
      facet_grid(gear~cyl, label = label_both)
    qplot(factor(mtcars$cyl), geom = "bar")
    
    qplot(factor(mtcars$cyl), geom = "blank", fill = factor(mtcars$am),
          xlab = "", ylab = "", main = "sdfsdfsf") + 
            geom_bar(position = "dodge") + 
            scale_x_discrete(label = c("V4", "V6", "V8"))+
            scale_y_continuous(breaks = seq(0, 12, 2)) +
            theme_bw() +
            coord_flip()+
            scale_fill_grey(name = "Trans.",
                            labels = c("auto", "manual"))
    ggplot() +
      geom_point(data = mtcars, mapping = aes( x = wt, y = mpg, shape = factor(cyl)),
                 size = 3)+
      geom_smooth(data = mtcars, mapping = aes( x = wt, y = mpg),
                  method = 'lm')
    ggplot(data = mtcars, aes(x=wt, y = mpg)) + 
      geom_point(aes(color = factor(cyl)))+
      geom_smooth(method = 'lm')
                            
                            
                            
                            
                            
                            
          
    

      

  • 相关阅读:
    JPA的一对一映射
    JPA的查询语言—JPQL的命名查询@NamedQuery
    JPA的persistence.xml文件
    JPA的主键产生策略
    JPA的查询语言—JPQL的简单查询
    Oracle Flashback救急了一回
    JPA的实体
    JPA的一对多映射(双向)
    JPA的一对多映射(单向)
    MySQL 主从同步操作文档
  • 原文地址:https://www.cnblogs.com/sineagle/p/14677852.html
Copyright © 2011-2022 走看看