1

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}]
olliepower
  • 2,254
  • 2
  • 21
  • 34

1 Answers1

4

Change to:

Plot[Evaluate@(Vmorse[x] /. morseSubsTest), {x, 0, 5}, 
 PlotRange -> {-5, 0.5}, PlotLabel -> "Morse Potential change alpha", 
 PlotStyle -> {Red, Green, Blue}]
ciao
  • 25,774
  • 2
  • 58
  • 139
  • 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? – Dr. belisarius Mar 04 '14 at 01:27
  • @belisarius: This? http://mathematica.stackexchange.com/questions/11772/using-evaluate-and-evaluated-true-in-plot – ciao Mar 04 '14 at 02:05