text: user16733: I have a Seurat object and plotted the Dimplot for UMAP visualization for 2 variables, as shown in the image below.
  
  Now, the problem is that I want the group by variables such as Non-responder and Responder and anti-CLTA4, anti-CLTA4+PD1, anti-PD1 on the top of the UMAP plot and not on the right side. My desired output would look like the following.
  
  The timely help is highly appreciated, many thanks.
  
  user15489: DimPlot returns a ggplot object, so ggplot functions can be applied to it. You can change the legend position like this:
  DimPlot(data) + theme(legend.position = "top")
  # or
  DimPlot(data) + theme(legend.position = c(.1, .9))
  
  
original_text: 16733: <p>I have a Seurat object and plotted the Dimplot for UMAP visualization for 2 variables, as shown in the image below.</p>
  <p><a href="https://i.stack.imgur.com/2gj8q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2gj8q.png" alt="enter image description here" /></a></p>
  <p>Now, the problem is that I want the group by variables such as <code>Non-responder and Responder</code> and <code>anti-CLTA4, anti-CLTA4+PD1, anti-PD1</code> on the top of the UMAP plot and not on the right side. My desired output would look like the following.</p>
  <p><a href="https://i.stack.imgur.com/imshU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/imshU.png" alt="enter image description here" /></a></p>
  <p>The timely help is highly appreciated, many thanks.</p>
   15489: <p>DimPlot returns a ggplot object, so ggplot functions can be applied to it. You can change the legend position like this:</p>
  <pre><code>DimPlot(data) + theme(legend.position = &quot;top&quot;)
  # or
  DimPlot(data) + theme(legend.position = c(.1, .9))
  </code></pre>
  