Answers.Body: <p>Did you try to use <code>DotPlot(..., scale.by = &quot;size&quot;)</code>?</p>
  <p>In contrast to the default <code>scale.by= &quot;radius&quot;</code>, this will link the <em>area</em> (<code>==2*pi*r^2</code>), not the radius, of the circles to the fraction of cells expressing the feature.
  This corresponds much better to our perception of size and will make differences in low values easier to see.</p>
  <p>Reading <code>?Seurat::DotPlot</code> the <code>scale.min</code> parameter looked promising but looking at <a href="https://github.com/satijalab/seurat/blob/c9f2660ee6b88189acc3ff4aa6088a46a2558dd3/R/visualization.R#L1980" rel="nofollow noreferrer">the code</a> it seems to censor the data as well.</p>
  <p>Since Seurat's plotting functionality is based on <code>ggplot2</code> you can also adjust the color scale by simply adding <code>scale_fill_viridis()</code> etc. to the returned plot. This might also work for <code>size</code>. Try something like:</p>
  <pre class="lang-r prettyprint-override"><code>DotPlot(...) + scale_size(range = c(5, 10)) # will likely warn about supplying the same scale twice
  </code></pre>
  <p>Apart from this, Seurat's plotting system is not very hackable and I find it much easier to extract the relevant data and plot them myself with <code>ggplot2</code>.</p>
  <p>Yet another comment: Your plot with the strong differences looks much more convincing to me wrt. to the marker property of these genes than the cited plot.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-18T18:07:24.520Z
Answers.LastActivityDate: 2021-11-18T07:35:18.393Z
Answers.LastEditDate: 2021-11-18T07:35:18.393Z
Answers.UserDisplayName: jan-glx
Answers.Body: <p>You can define your breaks with:</p>
  <pre><code>p + scale_size(breaks = c(0, 25, 50, 75))
  </code></pre>
  <p>You can adjust the size of the points with:</p>
  <pre><code>p + scale_size(range = c(1,8))     # Note: c(1,6) is the default
  </code></pre>
  <p>For more info, see <code>??scale_size</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-13T00:14:32.777Z
Answers.LastActivityDate: 2021-11-13T00:24:52.593Z
Answers.LastEditDate: 2021-11-13T00:24:52.593Z
Answers.UserDisplayName: agammage
Body: <p>I want to use the DotPlot function from Seurat v3 to visualise the expression of some genes across clusters. However when the expression of a gene is zero or very low, the dot size is so small that it is not clearly visible when printed on paper. Please is there a possibility to increase the minimum dot size in the DotPlot function to make the dot sizes more visible when printed?</p>
  
  <p>For example, I would like to have a minimum dot size set to be like </p>
  
  <p><a href="https://i.sstatic.net/aQfL6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aQfL6.png" alt="in this image"></a></p>
  
  <p>from <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5746044/figure/F11/" rel="nofollow noreferrer">this publication</a></p>
  
  <p>Rather than:</p>
  
  <p><a href="https://i.sstatic.net/KqEwE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KqEwE.png" alt="this image"></a></p>
  
  <p>from <a href="https://www.nature.com/articles/s41598-018-24725-0/figures/1#" rel="nofollow noreferrer">this other publication</a></p>
  
  <p>Thank you in advance for your helpful hint.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-08T09:45:08.177Z
Comments.Text: You can set the scale using the `dot.scale` option. This will affect all the points, not only the `0s`.
Comments.UserDisplayName: fra
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-08T12:04:29.770Z
Comments.Text: @fra. Thank you but when I increase the dot.scale parameter,only the bigger points really change. The smaller points change only when the dot.scale value is really high and the rest of the image now looks unappealing.
Comments.UserDisplayName: Charles
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-18T17:38:37.033Z
Comments.Text: It would be much easier to answer your question if you provided a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)
Comments.UserDisplayName: jan-glx
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-18T18:09:27.263Z
Comments.Text: Had also been asked on https://github.com/satijalab/seurat/issues/2297 .
Comments.UserDisplayName: jan-glx
Tags: <seurat><ggplot2>
Title: How do I increase the minimum dot size in Seurat's DotPlot function?
ThreadText: # How do I increase the minimum dot size in Seurat's DotPlot function?
  
  (Asked by: username_0 on 2019-11-08)
  
  I want to use the DotPlot function from Seurat v3 to visualise the expression of some genes across clusters. However when the expression of a gene is zero or very low, the dot size is so small that it is not clearly visible when printed on paper. Please is there a possibility to increase the minimum dot size in the DotPlot function to make the dot sizes more visible when printed?
  
  For example, I would like to have a minimum dot size set to be like
  
  [![in this image](https://i.sstatic.net/aQfL6.png)](https://i.sstatic.net/aQfL6.png)
  
  from [this publication](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5746044/figure/F11/)
  
  Rather than:
  
  [![this image](https://i.sstatic.net/KqEwE.png)](https://i.sstatic.net/KqEwE.png)
  
  from [this other publication](https://www.nature.com/articles/s41598-018-24725-0/figures/1#)
  
  Thank you in advance for your helpful hint.
  
  **Tags:** seurat, ggplot2
  
  > **Comments:**
  > **username_1**: You can set the scale using the `dot.scale` option. This will affect all the points, not only the `0s`.  
  > **username_0**: @username_1. Thank you but when I increase the dot.scale parameter,only the bigger points really change. The smaller points change only when the dot.scale value is really high and the rest of the image now looks unappealing.  
  > **username_2**: It would be much easier to answer your question if you provided a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)  
  > **username_2**: Had also been asked on https://github.com/satijalab/seurat/issues/2297 .  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-11-18. Score: 2
  
  Did you try to use `DotPlot(..., scale.by = "size")`?
  
  In contrast to the default `scale.by= "radius"`, this will link the *area* (`==2*pi*r^2`), not the radius, of the circles to the fraction of cells expressing the feature.
  This corresponds much better to our perception of size and will make differences in low values easier to see.
  
  Reading `?Seurat::DotPlot` the `scale.min` parameter looked promising but looking at [the code](https://github.com/satijalab/seurat/blob/c9f2660ee6b88189acc3ff4aa6088a46a2558dd3/R/visualization.R#L1980) it seems to censor the data as well.
  
  Since Seurat's plotting functionality is based on `ggplot2` you can also adjust the color scale by simply adding `scale_fill_viridis()` etc. to the returned plot. This might also work for `size`. Try something like:
  
  ```r
  DotPlot(...) + scale_size(range = c(5, 10)) # will likely warn about supplying the same scale twice
  
  ```
  
  Apart from this, Seurat's plotting system is not very hackable and I find it much easier to extract the relevant data and plot them myself with `ggplot2`.
  
  Yet another comment: Your plot with the strong differences looks much more convincing to me wrt. to the marker property of these genes than the cited plot.
  
  
  ---
  
  ### Answer by username_3 on 2021-11-13. Score: 0
  
  You can define your breaks with:
  
  ```
  p + scale_size(breaks = c(0, 25, 50, 75))
  
  ```
  
  You can adjust the size of the points with:
  
  ```
  p + scale_size(range = c(1,8))     # Note: c(1,6) is the default
  
  ```
  
  For more info, see `??scale_size`
  
  
  ---
  
  