# How to plot multiple curves with arrows in opposite directions

I need a plot with arrows going to the left on some curves and to the right on others. I have not figured out how to do this within a single Plot command. When I make two plots and try to overlay them with Show, the arrows all point the same direction. Minimum Working Example:

P1 = Plot[{
yh /. {a -> 4, b -> 1},
yn /. {a -> 2, b -> .002, n -> 3.5}
}, {x, -10, 10},
Frame -> True, PlotRange -> {{-10, 10}, {-10, 10}},
PlotStyle -> {Black}] /. Line -> Arrow
P2 = Plot[{
-yh /. {a -> 4, b -> 1},
-yn /. {a -> 2, b -> .002, n -> 3.5}
}, {x, -10, 10},
Frame -> True, PlotRange -> {{-10, 10}, {-10, 10}},
PlotStyle -> {Black}] /. Line -> Arrow
Show[P1, P2]


Notice that the arrows in P2 (which are correct) and in the output of Show do not point the same direction.

• You need to post the code for yh and yn.
– kglr
May 8, 2017 at 1:26

yh = b x^(2 ) + a ; yn = b (a x)^(3) + n; (* replace these with your yh and yn *)


Use a single Plot with PlotStyle specifying the Arrowheads for each curve:

Plot[{yh /. {a -> 4, b -> 1}, yn /. {a -> 2, b -> .002, n -> 3.5},
-yh /. {a -> 4, b -> 1}, -yn /. {a -> 2, b -> .002, n -> 3.5}},
{x, -10, 10},
Frame -> True, PlotRange -> {{-10, 10}, {-10, 10}},
PlotLegends -> {"yh /.{a -> 4,b ->1}",  "yn /.{a->2,b->.002,n->3.5}",
"-yh /.{a->4,b->1}", "-yn /.{a->2,b->.002,n->3.5}"},
PlotStyle -> {Directive[ah1, Red], Directive[ah1, Green],
Directive[ah2, Blue], Directive[ah2, Orange]}] /. Line -> Arrow


• Thanks!! I have never looked deeply enough to figure out the use of Directive. The results of this will show up in the next edition of my textbook. May 8, 2017 at 1:53
• @Paul, my pleasure. Welcome to mma.se.
– kglr
May 8, 2017 at 2:01