title: Customized Legend in Matlab
body: <p>Here I have a for loop to plot the content of my matrix.</p>
  
  <p>Based on 'type' value I determine the plot object (ks,bO,rX)</p>
  
  <pre><code>for k = 1:length(data1)
      if(type(k)==1)
         h=plot(data1(k,1),data1(k,2),'ks');set(h,'linewidth',2);hold on;
      elseif(type(k) ==0)
              h=plot(data1(k,1),data1(k,2),'bO');set(h,'linewidth',2); hold on;
      else
              h=plot(data1(k,1),data1(k,2),'rX');set(h,'linewidth',2); hold on;
      end
  end
  </code></pre>
  
  <p>I am little bit confused to find a way to put legend in my final figure, which shows my own explanation regarding each object(ks,bO,rX).</p>