1
$\begingroup$

I am generating a set of plots and exploring how changing a parameter affects the plot shape. I want each plot to be a different color, but the color rule i'm applying seems to only work for the last color in the list. what is wrong with my syntax?

Vmorse[x_] = 
d*(Exp[-2 \[Alpha] (x - x0)] - 2 Exp[-\[Alpha] (x - x0)]);
morseSubsTest = {d -> 4.43, \[Alpha] -> {1.9, 1, 3}, x0 -> 1.13};

 Plot[Vmorse[x] /. morseSubsTest, {x, 0, 5}, PlotRange -> {-5, 0.5}, 
 PlotLabel -> "Morse Potential change alpha", 
 PlotStyle -> {Red, Green, Blue}]
$\endgroup$
0

1 Answer 1

4
$\begingroup$

Change to:

Plot[Evaluate@(Vmorse[x] /. morseSubsTest), {x, 0, 5}, 
 PlotRange -> {-5, 0.5}, PlotLabel -> "Morse Potential change alpha", 
 PlotStyle -> {Red, Green, Blue}]
$\endgroup$
2
  • $\begingroup$ I can't find a question showing the differences between using Evaluate[f[x]] and the Option Evaluated -> True ... but it's out there. Who can find it? $\endgroup$ Commented Mar 4, 2014 at 1:27
  • $\begingroup$ @belisarius: This? mathematica.stackexchange.com/questions/11772/… $\endgroup$
    – ciao
    Commented Mar 4, 2014 at 2:05

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