# Why wont Mathematica plot my two functions on the same graph?

So I have defined two functions

s[p_] = -600 + 50 p
d[p_] = 1200 - 25 p


and I want to graph both of them on the same chart using the

Plot[{50 p - 600, -25 p + 1200}, {x, -10, 10}, PlotLegends → {"Function 1", "Function 2"}]


However, when I evaluate the cells, I get and error saying

Plot::nonopt: Options expected (instead of PlotLegends->{Function 1,Function 2}) beyond position 2 in Plot[{50 p-600,-4 p+1200},{p,-10,10},PlotLegends->{Function 1,Function 2}]. An option must be a rule or a list of rules.

Does anyone know how to fix this?

• PlotLegends is obsolete. If you erase this part your function will be drawn – cyrille.piatecki Oct 5 '16 at 5:03
• The problem seems to be with the arrow character (→). Try deleting it and replacing it with ->. – 2012rcampion Oct 5 '16 at 5:22

## 1 Answer

Plot[{50 p - 600, -25 p + 1200}, {p, -10, 10},
PlotLegends -> Placed["Expressions", Below]]


or

Plot[{50 p - 600, -25 p + 1200}, {p, -10, 10},
PlotLegends -> Placed[{"f1", "g1"}, Below]]

• Placed is not necessary; try Plot[{50 p-600,-25 p+1200},{x,-10,10},PlotLegends->{"Function 1","Function 2"}] (the original, but without the → character). – 2012rcampion Oct 5 '16 at 5:23