7
$\begingroup$
PolarPlot[{theta, Exp[theta]}, {theta, 1, 1.2},
    Frame -> True,
    PlotLegends -> "Expressions"
]

Looked into the filling option but does not seem to be able to make it work in the case...

Trying to make a visual of this

enter image description here

$\endgroup$

3 Answers 3

8
$\begingroup$

One way is to use ParametricPlot, which let's us introduce a second variable that lerps between the expressions:

ParametricPlot[
  (w*θ + (1-w)*Exp[θ]){Cos[θ], Sin[θ]}, 
  {θ, 1, 1.2}, 
  {w, 0, 1}, 
  AspectRatio -> 1, 
  Axes -> False
]

$\endgroup$
1
  • 1
    $\begingroup$ +1 But to more closely represent just adding filling use Show[ ParametricPlot[(w*θ+ (1 - w)*Exp[θ]) {Cos[θ], Sin[θ]}, {θ, 1, 1.2}, {w, 0, 1}, AspectRatio -> 1, Axes -> False, BoundaryStyle -> None], PolarPlot[{theta, Exp[theta]}, {theta, 1, 1.2}, Frame -> True, PlotLegends -> "Expressions"]] $\endgroup$
    – Bob Hanlon
    Commented Mar 19, 2022 at 14:04
6
$\begingroup$

You can use ParametricRegion and overlay it on your original plot using Show:

Show[
     Region[ParametricRegion[(w*θ + (1 - w)* Exp[θ]) {Cos[θ], Sin[θ]}, {{θ, 1, 1.2}, {w, 0, 1}}]]
     , PolarPlot[{θ, Exp[θ]}, {θ, 1, 1.2}, Frame ->True, PlotLegends -> "Expressions"]
]

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ +1 However the Region partially obscures the plot. Recommend that you reverse the order in the Show, i.e., Show[Region[ParametricRegion[(w*θ + (1 - w)*Exp[θ]) {Cos[θ], Sin[θ]}, {{θ, 1, 1.2}, {w, 0, 1}}], Frame -> True], PolarPlot[{θ, Exp[θ]}, {θ, 1, 1.2}, Frame -> True, PlotLegends -> "Expressions"]] $\endgroup$
    – Bob Hanlon
    Commented Mar 19, 2022 at 14:18
  • $\begingroup$ ok, done, thanks $\endgroup$ Commented Mar 19, 2022 at 15:11
5
$\begingroup$
plot = PolarPlot[{theta, Exp[theta]}, {theta, 1, 1.2}, Frame -> True, 
   PlotLegends -> "Expressions",PlotRange -> All];
{pts1, pts2} = Cases[plot, Line[a_] :> a, Infinity];
area = Polygon[Join[pts1, Reverse@pts2]];
Show[plot, Graphics[{Cyan, area}]]
area // Area

0.787193

enter image description here

$\endgroup$
3
  • $\begingroup$ The original code similar with @kglr ParametricPlot[θ*{Cos[θ], Sin[θ]}*(1 - s) + E^θ {Cos[θ], Sin[θ]}*s, {θ, 1, 1.2}, {s, 0, 1}, PlotStyle -> Brown, MeshFunctions -> {#4 &}, Mesh -> {{{0, Directive[AbsoluteThickness[4], Green]}, {1, Directive[AbsoluteThickness[4], Red]}}}, BoundaryStyle -> None, Frame -> True, Axes -> False, PlotRange -> All] $\endgroup$
    – cvgmt
    Commented Mar 19, 2022 at 14:06
  • $\begingroup$ +1 However, the region partially obscures the original plot. Recommend that you reverse the order in Show, i.e., Show[Graphics[{Cyan, area}, Frame -> True], plot] $\endgroup$
    – Bob Hanlon
    Commented Mar 19, 2022 at 14:12
  • $\begingroup$ @BobHanlon Thanks! $\endgroup$
    – cvgmt
    Commented Mar 19, 2022 at 14:31

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.