How do I get specific points to show up on plot?

`First I plot the data given on a graph (xy) `Every 8hrs (runs in a while loop doing a calculation) I need the graph to plot the point on the graph with a different color.`

Antworten (1)

KSSV
KSSV am 16 Jan. 2018

0 Stimmen

figure
hold on
for i = 1:10
x = rand ; y = rand ;
plot(x,y,'.','markersize',50,'color',rand(1,3)) ;
end

2 Kommentare

hi  hey
hi hey am 16 Jan. 2018
why are you settin I=10 and x and y = rand? Could you explain what's going on
KSSV
KSSV am 16 Jan. 2018
Bearbeitet: KSSV am 16 Jan. 2018
I have taken plots of 10 random points with a loop. I want to demonstrate how to put different colors.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 16 Jan. 2018

Bearbeitet:

am 16 Jan. 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by