Placing many arrowheads on curves

I can’t find anything anywhere on the web to help me with this.

My plot:

Plot[{(u (u + d) (1 – u))/u, u, 0}, {u, 0, 1},
PlotStyle -> {Orange, Green, Green}, PlotRange -> {-0.1, 1},
Frame -> True, Axes -> None, GridLines -> {{0}, {}},
GridLinesStyle -> Directive[Green]]

I would like to be able to put vertical arrows on the orange lines and horizontal arrows horizontal arrows on the green curve.

If it helps, this is a plot of the nullclines of a system of ODEs and i need to draw the direction of the arrows of the vector field on each nullclines.

=================

  

 

please observe that you haven’t defined “d”. Which values do you want “d” to assume?
– eldo
Jun 1 ’14 at 15:54

=================

1 Answer
1

=================

Two alternatives:

Either post-process the output of Plot to modify the graphics primitives and directives:

Plot[{(u (u + 2) (1 – u))/u, u, 0}, {u, 0, 1},
PlotStyle -> {Orange, Green, Green}, PlotRange -> {-0.1, 1},
Frame -> True, Axes -> None, GridLines -> {{0}, {}},
GridLinesStyle -> Directive[ Green]] /.
Line[x__] :> Sequence[Arrowheads -> Table[.025, {5}], Arrow[x]]

or, alternatively, use the following special setting for PlotStyle:

Plot[{(u (u + 2) (1 – u))/u, u, 0}, {u, 0, 1},
PlotStyle -> Thread[{{Orange, Green, Green},
Arrowheads[Table[.05, {5}]], (Arrow @@ ## &)}],
PlotRange -> {-0.1, 1}, Frame -> True, Axes -> None,
GridLines -> {{0}, {}}, GridLinesStyle -> Green]

Update: A simpler variant of the latter is using BaseStyle to change the default value for Arrowheads and post-process Lines into Arrows:

Plot[{(u (u + 2) (1 – u))/u, u, 0}, {u, 0, 1},
BaseStyle -> Arrowheads[Table[.05, {5}]],
PlotStyle -> {Orange, Green, Green}, PlotRange -> {-0.1, 1},
Frame -> True, Axes -> None, GridLines -> {{0}, {}},
GridLinesStyle -> Green] /. Line -> Arrow

  

 

Great! Just what I was looking for!
– user146338
Jun 1 ’14 at 16:04