# Filling for ListPolarPlot

I want to use Filling for ListPolarPlot in such a way that the points in the list are joined to the origin with a line colored same as in the Filling -> Axis of ListPlot.

I could do it up to a certain stage, but I couldn't set the color of the lines. Here is what I have done.

Suppose that

pl = Table[{k, Sin[k]}, {k, 0, 10}]


is the point list. I can connect them to the origin in a tricky way by

Show[Table[ListPolarPlot[{{0, 0}, pl[[k]]}, Joined->True], {k,1,Length[pl]}],
ListPolarPlot[pl]]


but I can not set the color of the joining lines as the following code would do.

ListPlot[pl, Filling -> Axis]


I would be very glad if someone would tell me how to color the lines.

• Have you tried PlotStyle? – E.O. Dec 17 '12 at 13:02
• Does adding PlotStyle -> Directive[Hue[0.67, 0.6, 0.6], Opacity[0.2]] after Joined->True in your code give what you need? – kglr Dec 17 '12 at 13:05
• you can get the specific color directives used in ListPlot[pl,Filling-Axis] using Normal[ListPlot[pl,Filling->Axis][]]. – kglr Dec 17 '12 at 13:10
• Thank you very much E.O. and kguler. I found in the examples of Mathematica PlotStyle->ColorFunction[1,"ColorData"] but could not find the right color. It seems that I had to change the Opacity. – bkarpuz Dec 17 '12 at 13:11

pl = Table[{k, Sin[k]}, {k, 0, 10}];

Show[
ListPolarPlot[{{0, 0}, #} & /@ pl,PlotStyle -> Directive[Thin, Green], Joined -> True],
ListPolarPlot[pl]
]


Where you can change Directive[Thin, Green] to whatever color is appropriate (the specifications in kguler's comment are probably what you are looking for)

You can draw a Line from origin to each point

Show[
ListPolarPlot[pl],
Graphics[{
Thin,Green,
Line[{{0,0},#[]{Cos[#[]],Sin[#[]]}}&/@pl]
}]
] Here's a function that takes a plot as first argument and adds lines from origin styled with following arguments:

fill[lpp_,spec___:Blue]:=Show[
lpp,
Graphics[{
Thin,spec,
Line[{{0,0},#}&/@lpp[[1,3,1]]]
}]
]

lpp=ListPolarPlot[pl];
fill[lpp,Red,Dashed] 