txt1=[{'A100'};{'B100'};{'C100'};{'X1'};{'X2'}];y=[100;150;200;135;140];x=[200;250;300;225;235]; figure(1),scatter(y, x, 'b^');grid off;text(y, x, txt1);title('points') xlabel('Y'); ylabel('X');line(y,x,'Color','k','LineWidth',1);
%I need to make X1 and X2 red in the figure1 while the other points are black.
Best Answer