1
$\begingroup$

This question already has an answer here:

Plot[{{A0 E^(-k1 t), -((
     A0 E^(-k1 t - k2 t) (-E^(k1 t) + E^(k2 t)) k1)/(k1 - k2)), (
    A0 E^(-k1 t - 
      k2 t) (-E^(k1 t) k1 + E^(k1 t + k2 t) k1 + E^(k2 t) k2 - 
       E^(k1 t + k2 t) k2))/(k1 - k2)} /. {A0 -> 1, k1 -> 4, 
    k2 -> 10}}, {t, 2, 0}]

How may I color each curve differently?

$\endgroup$

marked as duplicate by Jason B., Alexey Popkov, MarcoB, Jens, m_goldberg May 6 '16 at 21:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Plot[Evaluate[{A0 E^(-k1 t), -((A0 E^(-k1 t-k2 t) (-E^(k1 t)+E^(k2 t)) k1)/(k1-k2)), (A0 E^(-k1 t-k2 t) (-E^(k1 t) k1+E^(k1 t+k2 t) k1+E^(k2 t) k2-E^(k1 t+k2 t) k2))/(k1-k2)} /. {A0->1, k1->4, k2->10}], {t, 2, 0}] $\endgroup$ – Bill May 6 '16 at 6:09
  • 3
    $\begingroup$ Or Plot[...,Evaluated->True]. $\endgroup$ – xslittlegrass May 6 '16 at 6:11
0
$\begingroup$

For a verry nice Q & A see Using Evaluate and Evaluated -> True in Plot

Plot[{{A0 E^(-k1 t)
, -((A0 E^(-k1 t - k2 t) (-E^(k1 t) + E^(k2 t)) k1)/(k1 - k2))
, (A0 E^(-k1 t - k2 t) (-E^(k1 t) k1 + E^(k1 t + k2 t) k1 + E^(k2 t) 
k2 - E^(k1 t + k2 t) k2))/(k1 -k2)} /. {A0 -> 1, k1 -> 4, k2 -> 10}}
, {t, 2, 0}
, Evaluated -> True]

enter image description here

Plot[{{A0 E^(-k1 t)
, -((A0 E^(-k1 t - k2 t) (-E^(k1 t) + E^(k2 t)) k1)/(k1 - k2))
, (A0 E^(-k1 t - k2 t) (-E^(k1 t) k1 + E^(k1 t + k2 t) k1 + E^(k2 t) 
k2 - E^(k1 t + k2 t) k2))/(k1 -k2)} /. {A0 -> 1, k1 -> 4, k2 -> 10}}
, {t, 2, 0}
, Evaluated -> True
, PlotStyle -> {Red, Green, Blue}]

enter image description here

And contemplate the following:

A0 = 1; k1 = 4; k2 = 10;

Plot[{{A0 E^(-k1 t)
, -((A0 E^(-k1 t - k2 t) (-E^(k1 t) + E^(k2 t)) k1)/(k1 - k2))
, (A0 E^(-k1 t - k2 t) (-E^(k1 t) k1 + E^(k1 t + k2 t) k1 + E^(k2 t) 
k2 - E^(k1 t + k2 t) k2))/(k1 -k2)}}
, {t, 2, 0}]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.