title: How to change the class names in the legend of `plotroc`?
body: <p>I'm plotting the results of a multiclass classifier using <a href="http://www.mathworks.com/help/nnet/ref/plotroc.html" rel="nofollow noreferrer"><code>plotroc</code></a>. The documentation is a bit spotty. I'd like to know how to change the automatically generated legend to my class labels. </p>
  
  <p>I have 17 classes. My initial call to <code>plotroc(target, output)</code> produces this figure</p>
  
  <p><img src="https://i.stack.imgur.com/DfrY3.jpg" alt="ROC Curve"></p>
  
  <p>I tried to update the legend to include my class labels using <code>legend(class_labels)</code> where <code>class_labels</code> is a 17x1 cell array with the labels. Here's the result</p>
  
  <p><img src="https://i.stack.imgur.com/inj6K.jpg" alt="ROC Curve with Class Labels"> </p>
  
  <p>As you can see multiple labels were assigned to the grey line rather than simply replacing the labels in the first figure.</p>
  
  <p>As an alternative, the documentation also suggests using the syntax <code>plotroc(targets1,outputs2,'name1',...)</code> to generate multiple plots, I assume one for each class with different thresholds. So I tried both </p>
  
  <pre><code>plotroc(target, output, class_labels)
  </code></pre>
  
  <p>Which returned an error</p>
  
  <blockquote>
    <p>Error using horzcat Dimensions of matrices being concatenated are not
    consistent.</p>
    
    <p>Error in plotroc>update_plot (line 318)
                titleStr = [names{i} ' ROC'];</p>
    
    <p>Error in plotroc (line 111)
          plotData = update_plot(param,fig,plotData,update_args{:});</p>
  </blockquote>
  
  <p>And </p>
  
  <pre><code>plotroc(target, output, 'AtLocation', 'IsA', ... 'SymbolOf')
  </code></pre>
  
  <p>Which also returned an error </p>
  
  <blockquote>
    <p>Error using plotroc (line 106) Incorrect number of input arguments.</p>
  </blockquote>
  
  <p>Has anyone had success using the <code>plotroc(targets1,outputs2,'name1',...)</code> syntax or with changing the legend?</p>