Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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}]
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Change to:

Plot[Evaluate@(Vmorse[x] /. morseSubsTest), {x, 0, 5}, 
 PlotRange -> {-5, 0.5}, PlotLabel -> "Morse Potential change alpha", 
 PlotStyle -> {Red, Green, Blue}]
share|improve this answer
    
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? –  belisarius Mar 4 at 1:27
    
@belisarius: This? mathematica.stackexchange.com/questions/11772/… –  rasher Mar 4 at 2:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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