title: Is there a nicer way to plot this PCAPlot in ggplot after doing plotPCA in DESeq2?
body: <p>My data has the following structure:</p>
  <pre><code>structure(list(PC1 = c(0.575275450335122, -0.271560036518229, 
  0.953309669344739, -0.0973831071329307, 0.871105953866523, 0.0379904534598842, 
  0.737223421023106, -1.07991788617048, 0.977937610804854, 0.206927407135419, 
  0.846524295528142, -0.743507855124003, 0.229716783731562, -1.708551233374, 
  0.623630074143358, -1.22006221488515, 0.624234285603959, -1.56289307177187
  ), PC2 = c(0.912546111986394, -0.247117897558157, 1.15416425034184, 
  -0.0618766648767635, 1.30003524991646, -0.339609948322352, 0.12755285074635, 
  0.130688683339775, -0.596424639876554, -1.31752263137418, -0.390273336420353, 
  -0.562559844453795, -0.129516525520303, 0.407888572167762, -0.545085195561956, 
  0.177266986014392, -0.343592143975577, 0.323436123427009), group = structure(c(1L, 
  2L, 7L, 8L, 13L, 14L, 3L, 4L, 9L, 10L, 15L, 16L, 5L, 6L, 11L, 
  12L, 17L, 18L), .Label = c(&quot;High:D10:Basal&quot;, &quot;High:D10:Stim&quot;, 
  &quot;High:D14:Basal&quot;, &quot;High:D14:Stim&quot;, &quot;High:D18:Basal&quot;, &quot;High:D18:Stim&quot;, 
  &quot;Low:D10:Basal&quot;, &quot;Low:D10:Stim&quot;, &quot;Low:D14:Basal&quot;, &quot;Low:D14:Stim&quot;, 
  &quot;Low:D18:Basal&quot;, &quot;Low:D18:Stim&quot;, &quot;Medium:D10:Basal&quot;, &quot;Medium:D10:Stim&quot;, 
  &quot;Medium:D14:Basal&quot;, &quot;Medium:D14:Stim&quot;, &quot;Medium:D18:Basal&quot;, &quot;Medium:D18:Stim&quot;
  ), class = &quot;factor&quot;), CellType = structure(c(2L, 2L, 1L, 1L, 
  3L, 3L, 2L, 2L, 1L, 1L, 3L, 3L, 2L, 2L, 1L, 1L, 3L, 3L), .Label = c(&quot;Low&quot;, 
  &quot;High&quot;, &quot;Medium&quot;), class = &quot;factor&quot;), Donor = structure(c(1L, 
  1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 
  3L), .Label = c(&quot;D10&quot;, &quot;D14&quot;, &quot;D18&quot;), class = &quot;factor&quot;), Day = structure(c(1L, 
  2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 
  2L), .Label = c(&quot;Basal&quot;, &quot;Stim&quot;), class = &quot;factor&quot;), name = c(&quot;D10_High_d0&quot;, 
  &quot;D10_High_d7&quot;, &quot;D10_Low_d0&quot;, &quot;D10_Low_d7&quot;, &quot;D10_Medium_d0&quot;, &quot;D10_Medium_d7&quot;, 
  &quot;D14_High_d0&quot;, &quot;D14_High_d7&quot;, &quot;D14_Low_d0&quot;, &quot;D14_Low_d7&quot;, &quot;D14_Medium_d0&quot;, 
  &quot;D14_Medium_d7&quot;, &quot;D18_High_d0&quot;, &quot;D18_High_d7&quot;, &quot;D18_Low_d0&quot;, 
  &quot;D18_Low_d7&quot;, &quot;D18_Medium_d0&quot;, &quot;D18_Medium_d7&quot;)), class = &quot;data.frame&quot;, row.names = c(&quot;D10_High_d0&quot;, 
  &quot;D10_High_d7&quot;, &quot;D10_Low_d0&quot;, &quot;D10_Low_d7&quot;, &quot;D10_Medium_d0&quot;, &quot;D10_Medium_d7&quot;, 
  &quot;D14_High_d0&quot;, &quot;D14_High_d7&quot;, &quot;D14_Low_d0&quot;, &quot;D14_Low_d7&quot;, &quot;D14_Medium_d0&quot;, 
  &quot;D14_Medium_d7&quot;, &quot;D18_High_d0&quot;, &quot;D18_High_d7&quot;, &quot;D18_Low_d0&quot;, 
  &quot;D18_Low_d7&quot;, &quot;D18_Medium_d0&quot;, &quot;D18_Medium_d7&quot;), percentVar = c(0.386943314549313, 
  0.207313334715293))
  </code></pre>
  <p>The data was  retrieved after doing plotPCA in the DESeq2 package.
  I have &quot;three levels&quot; of attributes that I'd like to explore in this PCA, so I figured that using shape, fill and text to label them was enough (with the following code). But for some reason, the legend for the fill is not showing the correct colours. The PCA is OK, but the colours in the legend are all black. Is there a better way to plot my dummy data?</p>
  <pre><code>percentVar &lt;- round(100 * attr(pcaData, &quot;percentVar&quot;))
  ggplot(pcaData, aes(x= PC1, y = PC2))+
    geom_point(size= 3, aes(shape=CellType, fill=Day)) +
    scale_fill_manual(values = c(&quot;#E69F00&quot;, &quot;#56B4E9&quot;))+
    scale_shape_manual(values=c(21, 23, 25))+
    geom_text_repel(size= 3.5, aes(label=Donor, colour=Donor))+ 
    scale_color_discrete()+
    xlab(paste0(&quot;PC1: &quot;, percentVar[1], &quot;% variance&quot;)) +
    ylab(paste0(&quot;PC2: &quot;, percentVar[2], &quot;% variance&quot;)) +
    coord_fixed() +
    ggtitle(&quot;PCA with Scaled data&quot;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Qhxvy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qhxvy.png" alt="PCA OK for what I am looking for. Color labels for &quot;Day&quot; are black, it's not correct" /></a></p>