# Filling to Axis as Arrow

In version 9 I could do the following with the output as shown.

ListPlot[Table[{x, x^2}, {x, 0, 1, 0.1}], PlotRange -> All,
Filling -> Axis, FillingStyle -> (Arrow[#] &)]


Now in version 10.0.2 with the same input I get the following.

How do I get my arrows back? PlotTheme Classic does not help. Thanks

• plot /. Line -> Arrow can be a quick fix. – Kuba Jan 18 '15 at 17:58
• Another quick fix is PlotMarkers -> "\[FilledUpTriangle]" – ybeltukov Jan 18 '15 at 18:04
• @ybeltukov Not exactly the same but very clever! – Mr.Wizard Jan 18 '15 at 18:06

It seems this form still works:

ListPlot[
Table[{x, x^2}, {x, 0, 1, 0.1}],
PlotRange -> All,
Filling -> {1 -> {Axis, Arrow[#] &}}
]


## Caveat

The use of a Function as a filling style seemed undocumented, therefore one cannot expect the feature to remain or remain unchanged in new versions of Mathematica. ybeltukov notes in a comment that the form above does not work with multiple plot sets. In light of this I suppose that it would be better to write our own plotting function using Graphics primitives if this kind of customization is needed, since that functionality is documented and hopefully will not incompatibly change in future releases. (This is often faster as well as it avoids a lot of overhead associated with generalized plotting.) Post-processing is quick but also easily breaks between versions as the plotting output format often changes.

• How to do the same thing for several lists of points? Even {1 -> {Axis, Arrow[#] &}, 2 -> {Axis, Arrow[#] &}} produces a strange error Filling::invfillentry: "{2->{Axis,Arrow[#1]&},2->{Axis,Arrow[#1]&}} is not a valid Filling specification. " – ybeltukov Jan 18 '15 at 18:35
• @ybeltukov Problem noted in the answer, along with my thoughts. – Mr.Wizard Jan 18 '15 at 18:44
• @Mr.Wizard Many thanks for your answer which I have now accepted. Also your comment. Probably a Graphics construct is best as you suggest. – Hugh Jan 19 '15 at 22:01