<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ## 基本散點圖展示 ### 應用場景 箱型圖應用非常常見,比如:兩組比較,多組比較,多組里面的兩兩比較 ![scatter plot](http://kancloud.nordata.cn/2018-12-30-074243.png) ### 利用ggplot2創建boxplot ```R # rt為2.1 scatter plot所展示的數據 # rt_box如上圖所示 rt <- read.table(file = "/Users/stead/Documents/SourceTree/gitbook/R_visualization/data/LUAD_test.txt", header = TRUE, row.names = 1, stringsAsFactors = FALSE) # 準備ggplot2所需數據格式 rt_box <- data.frame(cbind(as.numeric(rt['TP53',]), c(rep('tumor', 57), rep('normal', 57)))) colnames(rt_box) <- c('TP53', 'group') rt_box$TP53 <- as.numeric(rt_box$TP53) ``` ```R library(ggplot2) P <- ggplot(rt_box, aes(x = group, y = TP53)) + geom_boxplot(outlier.colour="red", outlier.shape=8, outlier.size=4) print(P) ``` ![scatter plot](http://kancloud.nordata.cn/2018-12-30-74244.png) ```R # P 來自于上圖 P + geom_jitter(shape=16, position=position_jitter(0.2))#在boxplot中加入具體表達值所在的位置點 ``` ![scatter plot](http://kancloud.nordata.cn/2018-12-30-074244.png) ```R P2 <- ggplot(rt_box, aes(x = group, y = TP53, color = group)) + geom_boxplot() + theme_classic() #改變下主題 print(P2) ``` ![scatter plot](http://kancloud.nordata.cn/2018-12-30-074245.png) ```R P3 <- ggplot(rt_box, aes(x = group, y = TP53, fill = group)) + geom_boxplot() + theme_classic() + geom_dotplot(binaxis='y', stackdir='center', position=position_dodge(1)) print(P3) ``` ![scatter plot](http://kancloud.nordata.cn/2018-12-30-074246.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看