title: Adding a legend to an rgl 3d plot
body: <p>I am trying to draw a 3d plot using rgl with colors legend indicating which color refer to which class (called 'cut.rank'):</p>
  
  <pre><code>plot3d(
  data.focus$normalized.price_shipping,
  data.focus$seller_feedback_score_rank,
  data.focus$seller_positive_feedback_percent_rank, 
  col=as.factor(data.focus$cut.rank), 
  size=1, 
  type='s',
  xlab = 'Normalized Price',
  ylab = 'Seller Feedbacl Score Rank',
  zlab = 'Seller Positive Feedback Percent Rank',
  main = 'Rank By Price, Feedback score and Positive Feedback Score',
  sub = 'Search Rank has 3 colored levels',
  colkey = list(length = 0.5, width = 0.5, cex.clab = 0.75))
  ) 
  </code></pre>
  
  <p>But I can't seem to get the legend showing up in the plot. (See attached plot)
  Any idea ?<img src="https://i.stack.imgur.com/GFJBq.png" alt="enter image description here"></p>