Answers.Body: <p>The <code>DimPlot()</code> function of the new version of Seurat, <code>Seurat v3</code> has a <code>split.by</code> argument, which splits the plot based on the levels of the variable provided. You basically need to provide a column from the <code>@metadata</code> slot:</p>
  <pre><code>DimPlot(whole, split.by = &quot;orig.ident&quot;, reduction = &quot;umap&quot;)
  </code></pre>
  <p>If you are using <code>Seurat v2</code>, you can have the <code>DimPlot()</code> function return the <code>ggplot</code> object created and then use <code>facet_wratp()</code> or <code>facet_grid()</code> to generate facets based on your variable of interest.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-15T15:21:55.647Z
Answers.Text: Hi haci, I'm using Seurat v3. And I do not precisely know what you mean. Can you send me the code to have tried? Thank you.
Answers.UserDisplayName: hua
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-15T07:23:46.827Z
Answers.LastActivityDate: 2021-06-07T01:04:49.733Z
Answers.LastEditDate: 2021-06-07T01:04:49.733Z
Answers.UserDisplayName: haci
Body: <p>I'm curious about can we show the orig.ident in sprat windows by using Seurat? Here are my code and the fig I got. Is it possible that I can separate each orig.ident into a single panel? <code>DimPlot(whole,group.by = "orig.ident", reduction = "umap")</code><a href="https://i.sstatic.net/oc7hY.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oc7hY.jpg" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-19T18:10:05.983Z
Comments.Text: Answered on GitHub here: https://github.com/satijalab/seurat/issues/2106
Comments.UserDisplayName: TimStuart
Tags: <single-cell>
Title: can we show the orig.ident in separate windows by using Seurat
ThreadText: # can we show the orig.ident in separate windows by using Seurat
  
  (Asked by: username_0 on 2019-09-15)
  
  I'm curious about can we show the orig.ident in sprat windows by using Seurat? Here are my code and the fig I got. Is it possible that I can separate each orig.ident into a single panel? `DimPlot(whole,group.by = "orig.ident", reduction = "umap")`[![enter image description here](https://i.sstatic.net/oc7hY.jpg)](https://i.sstatic.net/oc7hY.jpg)
  
  **Tags:** single-cell
  
  > **Comments:**
  > **username_1**: Answered on GitHub here: https://github.com/satijalab/seurat/issues/2106  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-09-15. Score: 1
  
  The `DimPlot()` function of the new version of Seurat, `Seurat v3` has a `split.by` argument, which splits the plot based on the levels of the variable provided. You basically need to provide a column from the `@metadata` slot:
  
  ```
  DimPlot(whole, split.by = "orig.ident", reduction = "umap")
  
  ```
  
  If you are using `Seurat v2`, you can have the `DimPlot()` function return the `ggplot` object created and then use `facet_wratp()` or `facet_grid()` to generate facets based on your variable of interest.
  
  > **Comments:**
  > **username_0**: Hi username_2, I'm using Seurat v3. And I do not precisely know what you mean. Can you send me the code to have tried? Thank you.  
  
  ---
  
  