Answers.Body: <p>You add the points with <code>geom_point()</code>. Just remove it and you will get your "empty" boxplot. </p>
  
  <pre><code>q &lt;- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  </code></pre>
  
  <p>Unfortunately I couldn't use <code>stat_compare_means(method = "t.test")</code> and     <code>stat_n_text()</code>, but this two just add the labels.</p>
  
  <p><a href="https://i.sstatic.net/uUDCR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uUDCR.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-23T19:43:16.067Z
Answers.Text: yes, this is the mistake I'm doing. I removed geom_point(). It looks fine now. thanq
Answers.UserDisplayName: beginner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-23T17:17:40.800Z
Answers.LastActivityDate: 2018-11-23T17:17:40.800Z
Answers.UserDisplayName: Mr_Z
Body: <p>I have Microarray Normalized Expression data for a specific Gene. It looks like below in a dataframe <code>B</code></p>
  
  <pre><code>SampleID    Gene    Type
  Sample1     5.02    Tumor
  Sample2     5.06    Tumor
  Sample3     5.1     Tumor
  Sample4     5.11    Tumor
  Sample5    5.127    Normal
  Sample6     5.12    Normal
  Sample7    5.138    Normal
  Sample8    5.149    Normal
  </code></pre>
  
  <p>I see that the minimum expression value in the table is 5.0 and maximum expression value is around 5.9.</p>
  
  <p>I wanted to show the expression between two conditions with a boxplot and used following code.</p>
  
  <pre><code>q &lt;- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 add = "jitter", ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  q + stat_compare_means(method = "t.test") + 
    geom_point() + 
    stat_n_text()
  </code></pre>
  
  <p>This gave a plot like this <a href="https://i.sstatic.net/0wYwx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0wYwx.png" alt="Boxplot1"></a></p>
  
  <p>But when I remove the <code>jitter</code> from the code, </p>
  
  <pre><code>q &lt;- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  q + stat_compare_means(method = "t.test") + 
    geom_point() + 
    stat_n_text()
  </code></pre>
  
  <p>I see many black dots in the middle of the boxplot like this <a href="https://i.sstatic.net/wJPmQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wJPmQ.png" alt="Boxplot2"></a></p>
  
  <p>May I know why I see those dots in the second boxplot after removing the jitter. Is there a way to avoid that?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-23T13:52:44.467Z
Comments.Text: I don't know from where does the `ggboxplot` function comes from or `stat_compare_means`? Also please, continue [edit]ing the question to clarify the question. It is still unclear to me if you want to remove some points, add them or something else
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-23T14:22:39.270Z
Comments.Text: from the package ggpubr
Comments.UserDisplayName: beginner
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-23T17:46:41.970Z
Comments.Text: I am confused by the wording in "May I know why I see those dots in the second boxplot after removing the jitter. Is there a way to avoid that?" Are you trying to ask  "Why did the points not disappear after I remove jitter?"
Comments.UserDisplayName: winni2k
Tags: <r><rna-seq><microarray><ggplot2>
Title: Question about the dots on Quartile groups in boxplot
ThreadText: # Question about the dots on Quartile groups in boxplot
  
  (Asked by: username_0 on 2018-11-23)
  
  I have Microarray Normalized Expression data for a specific Gene. It looks like below in a dataframe `B`
  
  ```
  SampleID    Gene    Type
  Sample1     5.02    Tumor
  Sample2     5.06    Tumor
  Sample3     5.1     Tumor
  Sample4     5.11    Tumor
  Sample5    5.127    Normal
  Sample6     5.12    Normal
  Sample7    5.138    Normal
  Sample8    5.149    Normal
  
  ```
  
  I see that the minimum expression value in the table is 5.0 and maximum expression value is around 5.9.
  
  I wanted to show the expression between two conditions with a boxplot and used following code.
  
  ```
  q <- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 add = "jitter", ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  q + stat_compare_means(method = "t.test") + 
    geom_point() + 
    stat_n_text()
  
  ```
  
  This gave a plot like this [![Boxplot1](https://i.sstatic.net/0wYwx.png)](https://i.sstatic.net/0wYwx.png)
  
  But when I remove the `jitter` from the code,
  
  ```
  q <- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  q + stat_compare_means(method = "t.test") + 
    geom_point() + 
    stat_n_text()
  
  ```
  
  I see many black dots in the middle of the boxplot like this [![Boxplot2](https://i.sstatic.net/wJPmQ.png)](https://i.sstatic.net/wJPmQ.png)
  
  May I know why I see those dots in the second boxplot after removing the jitter. Is there a way to avoid that?
  
  **Tags:** r, rna-seq, microarray, ggplot2
  
  > **Comments:**
  > **username_1**: I don't know from where does the `ggboxplot` function comes from or `stat_compare_means`? Also please, continue [edit]ing the question to clarify the question. It is still unclear to me if you want to remove some points, add them or something else  
  > **username_0**: from the package ggpubr  
  > **username_2**: I am confused by the wording in "May I know why I see those dots in the second boxplot after removing the jitter. Is there a way to avoid that?" Are you trying to ask  "Why did the points not disappear after I remove jitter?"  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-11-23. Score: 3 | Accepted answer
  
  You add the points with `geom_point()`. Just remove it and you will get your "empty" boxplot.
  
  ```
  q <- ggboxplot(B, x = "Type", y = "Gene",
                 color = "black", palette = "npg",
                 ylab = 'Gene expression', xlab=FALSE,
                 order=c("Normal", "Tumor"))
  
  ```
  
  Unfortunately I couldn't use `stat_compare_means(method = "t.test")` and `stat_n_text()`, but this two just add the labels.
  
  [![enter image description here](https://i.sstatic.net/uUDCR.png)](https://i.sstatic.net/uUDCR.png)
  
  > **Comments:**
  > **username_0**: yes, this is the mistake I'm doing. I removed geom_point(). It looks fine now. thanq  
  
  ---
  
  