3
$\begingroup$

How do I label a disk when the disk is used in a Prolog or Epilog of a plot, such as:

PolarPlot[{\[Theta], Sqrt[\[Theta]]}, {\[Theta], 0, 3 \[Pi] + 0.1}, 
 Frame -> True, 
 Prolog -> {Blue, 
   Disk[{(3 \[Pi] + 0.1)*Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*
      Sin[3 \[Pi] + 0.1]}, 0.3], Orange, 
   Disk[{Sqrt[(3 \[Pi] + 0.1)]*Cos[3 \[Pi] + 0.1], 
     Sqrt[(3 \[Pi] + 0.1)]*Sin[3 \[Pi] + 0.1]}, 0.3]}]

Which generates: enter image description here

And I would like to add different labels to the individual disks, such as if generated by:

Labeled[Graphics@
  Disk[{(3 \[Pi] + 0.1)*Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*
     Sin[3 \[Pi] + 0.1]}, 0.3], "Parampara", {{Right, Center}}, 
 RotateLabel -> True]

enter image description here

Apparently, Labeled cannot be used as MA is complaining about graphics primitives, and I could not find a way to do this. There might be a way with Show, but I am already using the plot in a show so that the whole thing will get way too complicated.

$\endgroup$
1
  • $\begingroup$ Maybe Text would be helpful? $\endgroup$ Commented Jan 7 at 6:52

2 Answers 2

5
$\begingroup$
ClearAll["Global`*"];
PolarPlot[{\[Theta], Sqrt[\[Theta]]}, {\[Theta], 0, 3 \[Pi] + 0.1}, 
 Frame -> True, 
 Prolog -> {Blue, 
   Disk[{(3 \[Pi] + 0.1)*Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*
      Sin[3 \[Pi] + 0.1]}, 0.3], 
   Text[Style["1", White, Bold, 
     12], {(3 \[Pi] + 0.1)*Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*
      Sin[3 \[Pi] + 0.1]}], Orange, 
   Disk[{Sqrt[(3 \[Pi] + 0.1)]*Cos[3 \[Pi] + 0.1], 
     Sqrt[(3 \[Pi] + 0.1)]*Sin[3 \[Pi] + 0.1]}, 0.3], 
   Text[Style["2", White, Bold, 
     12], {Sqrt[(3 \[Pi] + 0.1)]*Cos[3 \[Pi] + 0.1], 
     Sqrt[(3 \[Pi] + 0.1)]*Sin[3 \[Pi] + 0.1]}]}]

Maybe Text can help?

enter image description here

$\endgroup$
1
$\begingroup$
PolarPlot[{\[Theta], Sqrt[\[Theta]]}, {\[Theta], 0, 3 \[Pi] + 0.1}, 
 PlotTheme -> {"Scientific", "PastelColor"}, ImageSize -> 800,
 Prolog -> {{Blue, 
    Disk[{(3 \[Pi] + 0.1)*Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*
       Sin[3 \[Pi] + 0.1]}, 0.3], 
    Text[Style["Parampara", 18, Bold, Blue, 
      FontFamily -> "Manjari"], {-8.9, -0.9}, Automatic, {0, 1}], 
    Black, Line[{{-8.8, -2.1}, {-8.8, 0.4}}]}, {Orange, 
    Disk[{Sqrt[(3 \[Pi] + 0.1)]*Cos[3 \[Pi] + 0.1], 
      Sqrt[(3 \[Pi] + 0.1)]*Sin[3 \[Pi] + 0.1]}, 0.3], 
    Text[Style["Pratistha", 18, Bold, Orange, 
      FontFamily -> "Manjari"], {-2.4, -0.2}, Automatic, {0, 1}], 
    Black, Line[{{-2.3, -1.2}, {-2.3, 0.8}}]}},
 
 Epilog -> {Text[
    Style["1", 18, Bold, White, 
     FontFamily -> "Waree"], {(3 \[Pi] + 0.1)*
      Cos[3 \[Pi] + 0.1], (3 \[Pi] + 0.1)*Sin[3 \[Pi] + 0.1]}, 
    Automatic, {1, 0}],
   Text[Style["2", 18, White, Bold, 
     FontFamily -> "Waree"], {Sqrt[(3 \[Pi] + 0.1)]*
      Cos[3 \[Pi] + 0.1], Sqrt[(3 \[Pi] + 0.1)]*Sin[3 \[Pi] + 0.1]}, 
    Automatic, {1, 0}] }
 ]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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