Ask Your Question
0

plot point color change

asked 2017-01-15 03:44:20 +0200

kaylavb23 gravatar image

updated 2017-01-15 05:41:00 +0200

kcrisman gravatar image

How do change the plot point color so that I can tell the difference between my three different equations? Here is what I have so far:

S = []
I = []
R = []

S.append(100000)
I.append(100)
R.append(0)

beta = 100
gamma = .4
lamda = 5e-006
mu = .001

i = 0
while(i<100):
    R.append(R[i] + (-mu * R[i] + gamma * I[i]))
    I.append(I[i] + (-mu * I[i] + lamda * S[i] * I[i] - gamma * I[i]))
    S.append(S[i] + (beta - mu * S[i] - lamda * S[i] * I[i]))

    i = i+1


N=range(1,100)

A = S
AN=zip(N,A)

B = I
BN=zip(N,B)

C = R
RN = zip(N,R)

plot(point(BN), legend_label = 'S(t)', color = 'green')
edit retag flag offensive close merge delete

Comments

But ... you already figured it out? color='green' is exactly what you do.

kcrisman gravatar imagekcrisman ( 2017-01-15 05:41:39 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-01-15 12:50:06 +0200

ndomes gravatar image

You can concatenate graphics objects:

G = Graphics()
G += points(AN, legend_label = 'AN', color = 'green')
G += points(BN, legend_label = 'S(t)', color = 'blue')
G += points(RN, legend_label = 'RN', color = 'red')
G.show()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-15 03:44:20 +0200

Seen: 1,339 times

Last updated: Jan 15 '17