title: legend position and size in ggplot2
body: <p>I have a some issue about legend position and legend box size problem in the ggplot2. I tried many things but no luck so far!</p>
  
  <p>I don't want to put manual coordination to the legend box location and adjust its size depending on the plot for each time. I would like to have it always at a certain position with adjusted size when only needed!</p>
  
  <p>I also want to remove 'white' filling in the background so I used </p>
  
  <pre><code>legend.key = element_blank()
  </code></pre>
  
  <p>but it seems it doesnt work too!</p>
  
  <pre><code>library(ggplot2) 
  
  ggplot(diamonds, aes(x = carat, y = price, color = cut)) + 
      geom_point() + 
      labs(title = "Scatterplot", x = "Carat", y = "Price") +    # add axis labels and plot title. print(gg)
      facet_wrap(color ~ cut) +
      theme(legend.position = c(0.9, 0.8),
            legend.title = element_text(colour = "black", size = 6, face = "bold"),
            legend.text = element_text(colour = "black", size = 6),
            legend.key = element_blank(),
      ) +
      guides(col = guide_legend(override.aes = list(size = 1, alpha = 1), 
                                nrow = 1, title.position = "left"))
  </code></pre>
  
  <p>which creates this plot</p>
  
  <p><a href="https://i.stack.imgur.com/bNksn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bNksn.png" alt="enter image description here"></a></p>