<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>

CC BY-SA 4.0
2019-11-18T18:07:24.520Z
2021-11-18T07:35:18.393Z
2021-11-18T07:35:18.393Z
jan-glx
<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>

CC BY-SA 4.0
2021-11-13T00:14:32.777Z
2021-11-13T00:24:52.593Z
2021-11-13T00:24:52.593Z
agammage
<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>

CC BY-SA 4.0
2019-11-08T09:45:08.177Z
You can set the scale using the `dot.scale` option. This will affect all the points, not only the `0s`.
fra
CC BY-SA 4.0
2019-11-08T12:04:29.770Z
@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.
Charles
CC BY-SA 4.0
2019-11-18T17:38:37.033Z
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)
jan-glx
CC BY-SA 4.0
2019-11-18T18:09:27.263Z
Had also been asked on https://github.com/satijalab/seurat/issues/2297 .
jan-glx
<seurat><ggplot2>
How do I increase the minimum dot size in Seurat's DotPlot function?
# 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**: @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.  
> **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 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:
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


---

