6

I'm trying to make a polar plot. The radial range (radius of the circle) is automatically set at 1.2. I want to change this to 1. My code is:

PolarPlot[Abs[1/2 (E^(I t) + 1)]^2, {t, 0, 2 π}, 
 PlotStyle -> {Darker[Blue], Thick},
 PolarAxes -> True,
 BaseStyle -> {FontFamily -> "Arial", FontSize -> 12},
 PolarTicks -> {{0, Pi/4, Pi/2, (3 Pi)/4, Pi, (5 Pi)/4, (3 Pi)/2, 
  (7 Pi)/4}, {0, .2, .4, .6, .8, 1}},
 PolarGridLines -> {{0, Pi/2, Pi, 3 Pi/2}, {0.25, 0.5, 0.75, 1}}]

enter image description here

On the internet I found the command PlotRange -> 1, but this makes it even worse.

PolarPlot[Abs[1/2 (E^(I t) + 1)]^2, {t, 0, 2 π}, 
 PlotStyle -> {Darker[Blue], Thick},
 PlotRange -> 1,
 PolarAxes -> True,
 BaseStyle -> {FontFamily -> "Arial", FontSize -> 12},
 PolarTicks -> {{0, Pi/4, Pi/2, (3 Pi)/4, Pi, (5 Pi)/4, (3 Pi)/2, 
  (7 Pi)/4}, {0, .2, .4, .6, .8, 1}},
 PolarGridLines -> {{0, Pi/2, Pi, 3 Pi/2}, {0.25, 0.5, 0.75, 1}}]

enter image description here

Does anyone know how to do this? Thanks in advance!

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
Linde
  • 61
  • 2

1 Answers1

10

Use PolarAxesOrigin like this: PolarAxesOrigin -> {0, 1}

PolarPlot[
 Abs[1/2 (E^(I t) + 1)]^2, {t, 0, 2 π}
 , PlotStyle -> {Darker[Blue], Thick}
 , PlotRange -> 1.2
 , PolarAxesOrigin -> {0, 1}
 , PolarAxes -> True
 , BaseStyle -> {FontFamily -> "Arial", FontSize -> 12}
 , PolarTicks -> {{0, Pi/4, Pi/2, (3 Pi)/4, 
    Pi, (5 Pi)/4, (3 Pi)/2, (7 Pi)/4}, {0, .2, .4, .6, .8, 1}}
 , PolarGridLines -> {{0, Pi/2, Pi, 3 Pi/2}, {0.25, 0.5, 0.75, 1}}
 ]

Mathematica graphics

Or for a better fit

PolarPlot[
 Abs[1/2 (E^(I t) + 1)]^2, {t, 0, 2 π}
 , PlotStyle -> {Darker[Blue], Thick}
 , PlotRange -> 1.2
 , PolarAxesOrigin -> {0, 1}
 , PolarAxes -> True
 , BaseStyle -> {FontFamily -> "Arial", FontSize -> 12}
 , PolarTicks -> {{0, Pi/4, Pi/2, (3 Pi)/4, 
    Pi, (5 Pi)/4, (3 Pi)/2, (7 Pi)/4}, {0, .2, .4, .6, .8, 1}}
 , PolarGridLines -> {{0, Pi/2, Pi, 3 Pi/2}, {0.25, 0.5, 0.75, 1}}
 ]

Mathematica graphics

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
rhermans
  • 36,518
  • 4
  • 57
  • 149