title: How to keep both rows of legend center justified and positioned at the center of the plot when legend.position = "top"
body: <p><strong>When I use</strong></p>
  
  <p><code>legend.position = "top"</code>  </p>
  
  <p>I can make the legend center justified but left positioned.</p>
  
  <p><strong>When I use</strong></p>
  
  <p><code>legend.position=c(.1, .9)</code></p>
  
  <p>I can put the legend center positioned but left justified (by manipulating these numbers).</p>
  
  <p><strong>None of these is what I want.</strong> </p>
  
  <p><strong>For example</strong></p>
  
  <pre><code>dat&lt;-structure(list(Name = c("A", "B", "C", "D"), Income = c(50, 
  101, 1001, 600), Members = c(10, 12, 14, 16), Status = c("New", "Old", "New", "Old")), row.names = c(NA, 
  -4L), class = "data.frame")
  
  View(dat)
  
  ggplot()+ 
   geom_point(data=dat,aes(x=Name,y=Income,colour=Status,
               size= Members), 
               shape = 20) +
    theme(legend.title = element_blank(),
          legend.position = "top",  #this keeps the legend center aligned but left positioned
          #legend.position=c(.1, .9), #manipulating these numbers I can put the legend center aligned but left justified
          legend.box = "vertical",
          legend.direction = "horizontal",
          legend.spacing.x = unit(0.1, 'cm'),
          legend.spacing.y = unit(0.1, 'mm'))+ 
          guides(fill=guide_legend(nrow=2))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Pf33r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Pf33r.png" alt="enter image description here"></a></p>
  
  <p>Thanks</p>