I want to have purple dashed line for my stem plot, as is shown here
Figure 0
but when I tried to set the options in ListPlot accordingly

ListPlot[Range[8], Filling -> 4, FillingStyle -> {Purple, Dashed}]

What I get is this Figure 1

ListPlot[Range[8], Filling -> 4, FillingStyle -> {{Purple, Dashed}}]

Figure 2

Can someone please help me with this issue? Thank you!


closed as off-topic by Bob Hanlon, m_goldberg, MarcoB, rhermans, LCarvalho Mar 18 at 11:14

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, m_goldberg, MarcoB, rhermans, LCarvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

ListPlot[Range[8], Filling -> 4, 
 FillingStyle -> Directive[Purple, Dashed]]

enter image description here

FillingStyle >> Details

  • FillingStyle->{ $g_-$, $g_+$} specifies that the filling should be done with $g_-$ when a point, curve or surface lies below the object being filled to, and with $g_+$ when it lies above.
  • Directives can be combined using Directive[$g_1$, $g_2$,…].

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