ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 15 Jan 2017 12:50:06 +0100plot point color changehttps://ask.sagemath.org/question/36295/plot-point-color-change/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')Sun, 15 Jan 2017 03:44:20 +0100https://ask.sagemath.org/question/36295/plot-point-color-change/Comment by kcrisman for <p>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:</p>
<pre><code>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')
</code></pre>
https://ask.sagemath.org/question/36295/plot-point-color-change/?comment=36296#post-id-36296But ... you already figured it out? `color='green'` is exactly what you do.Sun, 15 Jan 2017 05:41:39 +0100https://ask.sagemath.org/question/36295/plot-point-color-change/?comment=36296#post-id-36296Answer by ndomes for <p>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:</p>
<pre><code>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')
</code></pre>
https://ask.sagemath.org/question/36295/plot-point-color-change/?answer=36298#post-id-36298You 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()Sun, 15 Jan 2017 12:50:06 +0100https://ask.sagemath.org/question/36295/plot-point-color-change/?answer=36298#post-id-36298