# how to use filling in Graphic plots

i'm going to plot some angles in Trigonometric circle by using Graphic command how can i use filling axes by different colors in this program or color between the angles?

angles[t_] := Module[{o = {0, 0}, p = {Cos[t], Sin[t]}, rot},
rot = If[TrueQ[Pi/2 < Mod[t, 2 Pi] < 3 Pi/2], t + Pi, t];
{{Opacity[0.3], Line[{o, p}]},
Rotate[Inset[Style[Row[{t}], FontSize -> 18], p/2], rot]}];
Graphics[{Red, Circle[{0, 0}, 1], Blue,
Table[angles[
t  Degree ], {t  , {52, 0, 220, 180, 132, 282, 90, 320}}]},
Axes -> True, Ticks -> None]


Thanks.

• Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory Tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Aug 19 '15 at 19:37

Filling is not an option for Graphics, One approach is to use a PieChart as a background.

angles[t_] :=
Module[{o = {0, 0}, p = {Cos[t], Sin[t]}, rot},
rot = If[TrueQ[Pi/2 < Mod[t, 2 Pi] < 3 Pi/2], t + Pi, t];
{{Opacity[0.3], Line[{o, p}]},
Rotate[Inset[Style[Row[{t}], FontSize -> 18], p/2], rot]}];

ang = {52, 0, 220, 180, 132, 282, 90, 320} Degree // Sort;

ang = Append[ang, First[ang] + 360 Degree];

Show[
PieChart[Differences@ang/(360 Degree),
SectorOrigin -> {0, "Counterclockwise"},
ColorFunction -> ({Opacity[0.65],
ColorData["TemperatureMap"][RandomReal[]]} &),
ColorFunctionScaling -> True],
Graphics[{Red, Circle[{0, 0}, 1], Blue,
Table[angles[t Degree], {t, {52, 0, 220, 180, 132, 282, 90, 320}}]}]] I think using circular sectors generated with Disk may be easier:

SeedRandom

Clear[sector, angles]
sector[color_, angle_List] := {color, Disk[{0, 0}, .995, {angle[], angle[]} Degree]}

angles[t_] := Module[
{o = {0, 0}, p = {Cos[t], Sin[t]}, rot},
rot = If[TrueQ[Pi/2 < Mod[t, 2 Pi] < 3 Pi/2], t + Pi, t];
{{Opacity[0.3], Line[{o, p}]}, Rotate[Inset[Style[Row[{t}], FontSize -> 18], p/2], rot]}
]

listofangles = Sort@{52, 0, 220, 180, 132, 282, 90, 320};
listofcolors = RandomReal[1, Length[listofangles]];

Graphics[{
(* The outer circle *)
Thick, Red, Circle[],

(* Circular sectors generated from listofangles, colored by listofcolors*) I used a list of randomly chosen colors here. However, you can specify colors of your choosing by assigning a list of color names to listofcolors. You need to specify as many colors as you have angles in listofangles.