erbal
erbal

Reputation: 431

How to plot same point with two distinct makers having different Markersize and colour in MATLAB?

I want to use two distinct markers of different colour and size in MATLAB plot on same point for illustration purpose.

plot(100,200,'b*');
plot(100,200,'go','MarkerSize',12);

Though above two statement works perfectly, but i want to use it on a large number of points. Can above these two statements be combined into a single plot?

Upvotes: 1

Views: 55

Answers (1)

user2999345
user2999345

Reputation: 4195

just write a simple function yourself:

function emphasizePoint(X,Y)
    hold on;
    plot(X,Y,'b*');
    plot(X,Y,'go','MarkerSize',12);
end

and use it like

X = rand(1,100);
Y = rand(1,100);
emphasizePoint(X,Y);

Upvotes: 2

Related Questions