PolarPlot
更多信息和选项
- 角
以弧度为单位,从正
轴逆时针旋转. - 对应于
、
的
、
位置为
、
.
值不一定要位于
到
之间. - PolarPlot 视变量
为本地变量,实际上相当于使用 Block. - PolarPlot 具有属性 HoldAll,只在将具体的数值赋给
后才计算函数. - 某些情况下,在将具体数值赋给
之前,用 Evaluate 以符号方式计算函数可能更高效. - 在函数值为 None 的区域,不绘制任何曲线.
- 可将以下封装 w 用于 r:
-
Annotation[r,label] 为 r 提供注释 Button[r,action] 点击曲线 r 时执行 action Callout[r,label] 用 callout 标注函数 Callout[r,label,pos] 在相对位置 pos 处放置标注 EventHandler[r,events] 为 r 定义通用事件处理程序 Hyperlink[r,uri] 把函数变成超链接 Labeled[r,label] 标注函数 Labeled[r,label,pos] 把标签放在相对位置 pos Legended[r,label] 在图例中标识函数 PopupWindow[r,cont] 为函数添加弹出窗口 StatusArea[r,label] 鼠标悬停时在状态区域显示 Style[r,styles] 用指定样式显示函数 Tooltip[r,label] 为函数添加提示条 Tooltip[r] 用函数作为提示条 - 可在多个层级上应用封装 w:
-
w[r] 封装 r w[{r1,r2,…}] 封装一组曲线 w1[w2[…]] 使用嵌套的封装 - Callout、Labeled 和 Placed 可使用以下位置 pos:
-
Automatic 自动放置标签 Above, Below, Before, After 曲线周围的位置 u 参数 u 处靠近曲线的位置 {x,y} 靠近 {x,y} 的位置 Scaled[s] 沿曲线的缩放位置 s {s,Above},{s,Below},… 沿曲线的位置 s 处的相对位置 {pos,epos} 放置在曲线相对位置 pos 上的标签内的位置 epos - PolarPlot 具有与 Graphics 相同的选项,不同之处及更多选项如下所示: [所有选项的列表]
-
Axes True 是否绘制坐标轴 AxesOrigin {0,0} 坐标轴交叉的原点 ColorFunction Automatic 如何确定曲线的着色 ColorFunctionScaling True 是否缩放 ColorFunction 的参数 EvaluationMonitor None 每次运行函数时要计算的表达式 Exclusions Automatic 要排除的点
ExclusionsStyle None 在要排除的点处绘制什么内容 LabelingSize Automatic 标注和标签的最大尺寸 MaxRecursion Automatic 允许的递归子划分的最大数量 Mesh None 在每个曲线上绘制多少网格点 MeshFunctions {#3&} 如何决定网格点的放置 MeshShading None 如何处理网格点间区域的色调 MeshStyle Automatic 网格点的样式 Method Automatic 细化曲线的方法 PerformanceGoal $PerformanceGoal 优化的目标 PlotLabels None 曲线使用的标签 PlotLegends None 曲线的图例 PlotPoints Automatic 样本点的最初数量 PlotRange Automatic 要包含的值的范围 PlotRangeClipping True 在绘图范围边界处是否进行剪切 PlotStyle Automatic 指定每个曲线的样式的图形指令 PlotTheme $PlotTheme 绘图的整体主题 PolarAxes False 是否绘制极轴 PolarAxesOrigin Automatic 在哪里绘制极坐标轴 PolarGridLines None 要绘制的极坐标网格线 PolarTicks Automatic 极坐标轴刻度 RegionFunction (True&) 如何决定是否包含一个点 ScalingFunctions None 怎样缩放个别坐标 WorkingPrecision MachinePrecision 内部计算使用的精度 - PlotLegends 的典型设置包括:
-
None 无图例 Automatic 自动确定图例 "Expressions" 用 r1、r2、… 作为图例的标签 {lbl1,lbl2,…} 用 lbl1、lbl2、… 作为图例的标签 Placed[lspec,…] 为图例指定位置 - PlotStylesty 指定每条曲线使用的样式. 可能的设置包括:
-
{sty1,sty2,…} 针对各个数据集的一系列样式 <|"key"val,…|> 针对不同层级的数据的样式元素 - 接受的键有:
-
"Base" 所有 fi 的整体样式 "Functions" 针对每个 fi 的样式列表 styi - ColorData["DefaultPlotColors"] 给出 PlotStyle 使用的默认颜色序列.
- PolarPlot 最初在 PlotPoints 指定的多个等距采样点处对函数进行计算. 然后使用自适应算法来选择额外的样本点,最多将给定的区间细分 MaxRecursion 次.
- 应该注意的是,由于使用有限数量的样本点,PolarPlot 可能会遗漏函数中的特征. 如果想要检查所得结果是否正确,应尝试增大 PlotPoints 和 MaxRecursion 的设置.
- 如果无法绘制达到一定平滑程度的曲线,则 On[PolarPlot::accbend] 可以使 PolarPlot 显示一条提示信息.
- 设置 Mesh->All, PolarPlot 将在每个函数被采样的每条曲线上的每个位置绘制一个点.
- 提供给 MeshFunctions 和 RegionFunction 中的函数的参数是 x、y、θ、r. 提供给 ColorFunction 中的函数的是这些参数缩放过的版本.
- 在每条曲线的所有地方对函数进行计算.
- 如果采用缺省设置 Exclusions->Automatic 和 ExclusionsStyle->None,PolarPlot 在检测到的断点处断开曲线. Exclusions->None 则会绘制穿过断点的曲线.
- PolarPlot 通常返回 Graphics[{Line[…],…}].
- ScalingFunctions 的可能设置包括:
-
sr 缩放 r 轴 {sx,sy,sθ,sr} 缩放 x、y、θ 和 r - 常见的内置缩放函数 s 包括:
-
"Log" 
对数刻度,自动进行标记 "Log10" 
以 10 为底的对数刻度,用 10 的幂进行标记 "SignedLog" 
类似对数的刻度,包含 0 和负数 "Reverse" 
反转坐标的方向 - 缩放 θ 将影响如何对绘图采样,但不影响整体的视觉外观.
- 通常情况下,不能同时缩放 x 或 y 与 r.
所有选项的列表
范例
打开所有单元 关闭所有单元基本范例 (3)
范围 (23)
采样 (6)
PolarPlot[Sin[12θ], {θ, 0, 2Pi}]PolarPlot[Tan[θ], {θ, 0, 2Pi}]{PolarPlot[Sqrt[Sin[2θ]], {θ, 0, 2Pi}], PolarPlot[Im[Sqrt[Sin[2θ]]], {θ, 0, 2Pi}]}PolarPlot[Floor[θ], {θ, 0, 10}]用 PlotPoints 和 MaxRecursion 控制相应的采样:
Grid[Table[PolarPlot[1, {θ, 0, 2Pi}, PlotPoints -> pp, MaxRecursion -> mr], {mr, {0, 2}}, {pp, {5, 10}}]]用 PlotRange 强调感兴趣的区域:
Table[PolarPlot[Exp[θ], {θ, 0, 10}, PlotRange -> pr], {pr, {10, 50, 250}}]添加标签和图例 (7)
用 Callout 把表达式作为标签:
PolarPlot[Callout[Sin[2t]], {t, 0, 2Pi}]PolarPlot[Callout[Sin[2t], "label"], {t, 0, 2Pi}]Table[PolarPlot[Callout[Sin[3t], "label", i], {t, 0, 2Pi}, PlotLabel -> i], {i, {Pi / 4, 3Pi / 4}}]Table[PolarPlot[Callout[Sin[3t], "label", Scaled[i]], {t, 0, 2Pi}, PlotLabel -> i], {i, {1 / 8, 3 / 8}}]Table[PolarPlot[Callout[Sin[3t], "label", pos], {t, 0, 2Pi}, PlotLabel -> pos], {pos, {Left, Right}}]Table[PolarPlot[Callout[Sin[3t], "label", pos], {t, 0, 2Pi}, PlotLabel -> pos], {pos, {Before, After}}]用 PlotLabels 标注曲线:
PolarPlot[Cos[3t], {t, 0, 2Pi}, PlotLabels -> "Expressions"]PolarPlot[{Cos[t], Sin[t]}, {t, 0, Pi}, PlotLabels -> "Expressions"]PolarPlot[Callout[Sqrt[t], "label", Scaled[0.8]], {t, 0, 2Pi}]PolarPlot[Callout[Sqrt[t], "label", {Scaled[0.8], Below}], {t, 0, 2Pi}]PolarPlot[Callout[Sqrt[t], "label", {1.5, -1}], {t, 0, 2Pi}]演示 (10)
PolarPlot[{1, 2, 3}, {θ, 0, 2Pi}]PolarPlot[{1, 2, 3}, {θ, 0, 2Pi}, PlotStyle -> {Blue, Directive[Red, Dashed], Directive[Purple, Thick]}]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, AxesLabel -> {x, y}, PlotLabel -> Sin[4θ]]给每个曲线提供一个互动的 Tooltip:
PolarPlot[{Tooltip[1], Tooltip[2], Tooltip[3]}, {θ, 0, 2Pi}]PolarPlot[θ, {θ, 0, 4Pi}, Mesh -> 20]PolarPlot[θ, {θ, 0, 4Pi}, PlotStyle -> Thick, Mesh -> 20, MeshShading -> {Red, Orange, Yellow}]PolarPlot[θ, {θ, 0, 4Pi}, PlotStyle -> Thick, ColorFunction -> Function[{x, y, θ}, Hue[θ / (2Pi)]], ColorFunctionScaling -> False]PolarPlot[{1, 2, 3}, {θ, 0, 2Pi}, PlotStyle -> {Blue, Directive[Red, Dashed], Directive[Purple, Thick]}, PlotLegends -> "Expressions"]PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotTheme -> "Marketing"]PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotTheme -> "Minimal"]PolarPlot[θ, {θ, 0, 4Pi}, ScalingFunctions -> "Log"]PolarPlot[θ, {θ, 0, 4Pi}, ScalingFunctions -> {"SignedLog", None, None, None}, AspectRatio -> 1]选项 (134)
AspectRatio (3)
PolarPlot[Sqrt[t], {t, 0, 2 π}]用 AspectRatio1 使得高度与宽度一致:
PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> 1]AspectRatioFull 调整高度和宽度,使图形正好可以放置在其他结构中:
plot = PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> Full];{Framed[Pane[plot, {50, 100}]], Framed[Pane[plot, {100, 100}]], Framed[Pane[plot, {100, 50}]]}Axes (4)
PolarPlot[Sqrt[t], {t, 0, 2 π}]PolarPlot[Sqrt[t], {t, 0, 2 π}, Axes -> False]用 AxesOrigin 指定坐标轴相交的地方:
PolarPlot[Sqrt[t], {t, 0, 2 π}, AxesOrigin -> {1, 1}]{PolarPlot[Sqrt[t], {t, 0, 2 π}, Axes -> {True, False}], PolarPlot[Sqrt[t], {t, 0, 2 π}, Axes -> {False, True}]}AxesLabel (3)
AxesOrigin (2)
AxesStyle (4)
PolarPlot[Sqrt[t], {t, 0, 2 π}, AxesStyle -> Red]PolarPlot[Sqrt[t], {t, 0, 2 π}, AxesStyle -> {Red, Blue}]PolarPlot[Sqrt[t], {t, 0, 2 π}, AxesStyle -> Red, TicksStyle -> Green]PolarPlot[Sqrt[t], {t, 0, 2 π}, AxesStyle -> Green, LabelStyle -> Red]ColorFunction (4)
Table[PolarPlot[Sin[4θ], {θ, 0, 2Pi}, ColorFunction -> f], {f, {Function[{x, y, t, r}, Hue[x]], Function[{x, y, t, r}, Hue[y]], Function[{x, y, t, r}, Hue[t]], Function[{x, y, t, r}, Hue[r]]}}]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, ColorFunction -> "DarkRainbow"]ColorFunction 具有比 PlotStyle 更高的优先级:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, ColorFunction -> "DarkRainbow", PlotStyle -> Directive[Red, Thick]]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, ColorFunction -> Function[{x, y, t, r}, If[t > Pi, Red, StandardGray]], ColorFunctionScaling -> False, PlotStyle -> Thick]ColorFunctionScaling (1)
EvaluationMonitor (3)
Reap[PolarPlot[Sin[4θ], {θ, 0, 2Pi}, EvaluationMonitor :> Sow[θ]];]//Shortdata = Reap[PolarPlot[Sin[4θ], {θ, 0, 2Pi}, EvaluationMonitor :> Sow[Sin[4θ]{Cos[θ], Sin[θ]}]] ][[-1, 1]];ListPlot[data ]Block[{k = 0}, PolarPlot[Sin[4θ], {θ, 0, 2Pi}, EvaluationMonitor :> k++];k]Exclusions (3)
ExclusionsStyle (2)
Frame (4)
默认情况下,PolarPlot 不绘制边框:
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> {{True, True}, {False, False}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> {{True, False}, {True, False}}]FrameLabel (3)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameLabel -> "label"]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameLabel -> {{Left, None}, {Bottom, None}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameLabel -> {{Left, Right}, {Bottom, Top}}]FrameStyle (2)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameStyle -> Directive[StandardBrown, Thick]]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameStyle -> {{Directive[Green, Thick], Red}, {Directive[Gray, Thick], Directive[Blue]}}]FrameTicks (8)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> None]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> {{None, None}, {Automatic, None}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> Automatic]用 All 在所有边框上都显示刻度标签:
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> All]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> {{{-1, 0.5, 1}, Automatic}, {{-1, 1}, Automatic}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> {{{{-1, -a}, {0.5, b}, {1, a}}, Automatic}, {{{-1, -a}, {1, a}}, Automatic}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Axes -> False, Frame -> True, FrameTicks -> {{{{-1, -a, .2}, {1, a, .2}}, Automatic}, {Automatic, Automatic}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0, .9 π}, Axes -> False, Frame -> True, FrameTicks -> {{{{-1, -a, {.1, .1}}, {0.5, b, {.2, .1}}, {1, a, {.2, .1}}}, Automatic}, {Automatic, Automatic}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0, .9 π}, Axes -> False, Frame -> True, FrameTicks -> {{{{-1, -a, {.1, .1}, Directive[Thick, Blue]}, {0.5, b, {.1, .1}, Directive[Thick, Darker@Green, Dashed]}, {1, a, {.1, .1}, Directive[Thick, Red]}}, Automatic}, {Automatic, Automatic}}]FrameTicksStyle (3)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0, .9 π}, Axes -> False, Frame -> True, FrameStyle -> Directive[Red]]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0, .9 π}, Axes -> False, Frame -> True, FrameTicksStyle -> Directive[Red, Thick]]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0, .9 π}, Axes -> False, Frame -> True, FrameTicks -> All, FrameTicksStyle -> {{Directive[Magenta, Thick], Blue}, {Red, Darker@Green}}]ImageSize (7)
使用已命名的大小,如 Tiny、Small、Medium 和 Large:
{PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> Tiny], PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> Small]}{PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> 150], PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> 1.5, ImageSize -> 150]}{PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> {Automatic, 150}], PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> 2, ImageSize -> {Automatic, 150}]}{PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> UpTo[200]], PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> 2, ImageSize -> UpTo[200]]}PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> {200, 250}, Background -> LightBlue]设值 AspectRatioFull 将填充可用空间:
PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> Full, ImageSize -> {200, 250}, Background -> LightBlue]{PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> {UpTo[150], UpTo[100]}], PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}Framed[Pane[PolarPlot[Sqrt[t], {t, 0, 2 π}, ImageSize -> Full, Background -> LightBlue], {200, 100}]]Framed[Pane[PolarPlot[Sqrt[t], {t, 0, 2 π}, AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> LightBlue], {200, 100}]]LabelingSize (2)
PolarPlot[Callout[Cos[Sin[t]], RandomWord[], {0.5, -0.5}], {t, 0, 2Pi}]PolarPlot[Callout[Cos[Sin[t]], RandomWord[], {0.5, -0.5}], {t, 0, 2Pi}, LabelingSize -> 20]PolarPlot[Callout[Cos[Sin[t]], [image], {0.5, -0.5}], {t, 0, 2Pi}]PolarPlot[Callout[Cos[Sin[t]], [image], {0.5, -0.5}], {t, 0, 2Pi}, LabelingSize -> 60]MaxRecursion (1)
MaxRecursion 的每一级自动划分初始网线为一个更精细的网线:
Table[ PolarPlot[Sin[4θ], {θ, 0, 6Pi}, MaxRecursion -> i, Mesh -> All, Ticks -> None], {i, {0, 3, 6}}]Mesh (4)
{PolarPlot[Sqrt[θ], {θ, 0, 2Pi}, Mesh -> Full], PolarPlot[Sqrt[θ], {θ, 0, 2Pi}, Mesh -> All]}PolarPlot[Sqrt[θ], {θ, 0, 2Pi}, Mesh -> 10]PolarPlot[Sqrt[θ], {θ, 0, 2Pi}, Mesh -> {{Pi / 4, 5Pi / 4}}]PolarPlot[Sqrt[θ], {θ, 0, 2Pi}, Mesh -> {{{Pi / 4, PointSize[Large]}, {5Pi / 4, Red}}}]MeshFunctions (2)
Table[PolarPlot[Sin[4θ], {θ, 0, 2Pi}, MeshFunctions -> {f}, Mesh -> 15], {f, {Function[{x, y, t, r}, x], Function[{x, y, t, r}, y], Function[{x, y, t, r}, t], Function[{x, y, t, r}, r]}}]在
方向显示 5 层网格(红色),在
方向显示 10 层网格(蓝色):
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> {5, 10}, MeshFunctions -> {#1&, #2&}, MeshStyle -> {Directive[PointSize[Medium], Red], Blue}]MeshShading (6)
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15, MeshShading -> {Red, Blue}]用 None 移除段:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15, MeshShading -> {Red, None}]MeshShading 可以和 PlotStyle 连用:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> Thick, Mesh -> 15, MeshShading -> {Red, Blue}]在样式方面,MeshShading 具有较 PlotStyle 更高的优先级:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> Green, Mesh -> 15, MeshShading -> {Red, Blue}]设置 MeshShading 为 Automatic,对某些段使用 PlotStyle:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> Directive[Thick, Yellow], Mesh -> 15, MeshShading -> {Red, Automatic}]MeshShading 可以和 ColorFunction 连用:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> Thick, ColorFunction -> Function[{x, y, θ, r}, Hue[θ]], Mesh -> 15, MeshShading -> {StandardGray, Automatic}]MeshStyle (4)
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15, MeshFunctions -> {#1&}, MeshStyle -> Red]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15, MeshFunctions -> {#1&, #2&}, MeshStyle -> {Red, Blue}]PolarPlot[Sin[4θ], {θ, 0, 2Pi}, Mesh -> 15, MeshStyle -> Directive[PointSize[Large], Red]]PerformanceGoal (2)
PlotLabels (6)
PlotLabels->"Expressions" 使用函数作为曲线标签:
PolarPlot[{Sin[t], Cos[t]}, {t, 0, π}, PlotLabels -> "Expressions"]PolarPlot[{Sin[t], Cos[t]}, {t, 0, π}, PlotLabels -> {"label1", "label2"}]PolarPlot[{Sin[t], Cos[t]}, {t, 0, π}, PlotLabels -> Placed[{"label1", "label2"}, Above]]PolarPlot[{Sin[t], Cos[t]}, {t, 0, π}, PlotLabels -> {Placed["label1", Above], Placed["label2", Below]}]PolarPlot[{Sin[t], Cos[t]}, {t, 0, π}, PlotLabels -> {Callout["label1", {Scaled[0.3], Above}], Callout["label2", {Scaled[0.75], Below}]}]Table[PolarPlot[{Cos[t], Cos[3t]}, {t, 0, π}, PlotLabels -> Callout[{"label1", "label2"}, pos]], {pos, {After, Before}}]使用 None 不添加标签:
PolarPlot[{Cos[t], Cos[3t]}, {t, 0, π}, PlotLabels -> {"label1", None}]PlotLegends (7)
PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Automatic]PolarPlot[Sin[3t], {t, 0, Pi}]PolarPlot[Sin[3t], {t, 0, Pi}, PlotLegends -> All]PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> None]PlotLegends 自动提取 PlotStyle 选项值:
PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotStyle -> {Directive[Red, Dashed], Directive[Blue, AbsoluteThickness[5]]}, PlotLegends -> Automatic]以 TraditionalForm 在图例中显示表达式:
PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed["Expressions", Below]]PolarPlot[{1 + 1 / 10 Sin[3t], 1 + 1 / 10 Sin[6 t], 1 + 1 / 10 Sin[9t]}, {t, 0, 2π}, PlotStyle -> {Red, Blue, Orange}, PlotLegends -> {"ω = 3", "ω = 6", "ω = 9"}]Table[PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[Automatic, pl], PlotLabel -> pl], {pl, {After, Before}}]Table[PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[Automatic, pl], PlotLabel -> pl], {pl, {Above, Below}}]Table[PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[Automatic, pl], PlotLabel -> pl], {pl, {Right, Left}}]Table[PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[Automatic, pl], PlotLabel -> pl], {pl, {Top, Bottom}}]Table[PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[Automatic, pl], PlotLabel -> pl], {pl, {After, Above}}]使用 LineLegend 调整图例的外观:
PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotLegends -> Placed[LineLegend["Expressions", LegendFunction -> Panel, LabelStyle -> {FontSize -> 12, Bold, FontFamily -> "Helvetica"}, LegendMargins -> 5], Below]]指定 LegendMarkers:
marker = Graphics[BezierCurve[{{0, 0}, {1, 1}, {2, -1}, {3, 0}}], ImageSize -> Tiny]PolarPlot[{1, 1 + 1 / 10 Sin[10t]}, {t, 0, 2Pi}, PlotStyle -> {Directive[Red, AbsoluteThickness[3], AbsoluteDashing[5]], Directive[Blue, AbsoluteThickness[2], AbsoluteDashing[8]]}, PlotLegends -> SwatchLegend["Expressions", LegendMarkers -> marker, LegendMarkerSize -> 40]]PlotPoints (1)
PlotRange (2)
PolarPlot[θ, {θ, 0, 10}, PlotRange -> 12]PolarPlot[Exp[θ], {θ, 0, 10}]用 PlotRange 聚焦感兴趣的区域:
Table[PolarPlot[Exp[θ], {θ, 0, 10}, PlotRange -> pr], {pr, {10, 50, 250}}]PlotStyle (5)
Table[PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> ps], {ps, {Red, Thick, Dashed, Directive[Red, Thick]}}]PolarPlot[{θ, -θ}, {θ, 0, 4Pi}]PolarPlot[{θ, -θ}, {θ, 0, 4Pi}, PlotStyle -> {Purple, Orange}]PlotStyle 可以和 ColorFunction 连用:
PolarPlot[Abs[Sin[4θ]], {θ, 0, 2Pi}, PlotStyle -> Thick, ColorFunction -> Function[{x, y, t, r}, Hue[r]]]PlotStyle 可以同 MeshShading 连用:
PolarPlot[Sin[4θ], {θ, 0, 2Pi}, PlotStyle -> Thick, Mesh -> 15, MeshShading -> {Red, Blue}]PlotTheme (1)
PolarPlot[{θ, -θ}, {θ, 0, 4Pi}, PlotTheme -> "Business"]PolarPlot[{θ, -θ}, {θ, 0, 4Pi}, PlotTheme -> {"Business", "Detailed"}]PolarPlot[{θ, -θ}, {θ, 0, 4Pi}, PlotTheme -> {"Business", "Detailed"}, PlotStyle -> 96]PolarAxes (3)
PolarPlot[1 - 2Sin[θ], {θ, 0, 2π}, PlotRangePadding -> 3, PolarAxes -> True]PolarPlot[1 - 2Sin[θ], {θ, 0, 2π}, PlotRangePadding -> 3, PolarAxes -> True, PolarGridLines -> True]PolarPlot[1 - 2Sin[θ], {θ, 0, 2π}, PlotRangePadding -> 3, PolarAxes -> {True, False}, PolarGridLines -> True]PolarAxesOrigin (2)
PolarPlot[{2Sin[2θ], Cos[2θ]}, {θ, 0, 2π}, PlotRangePadding -> 2, PolarAxes -> True, PolarAxesOrigin -> {0, 3}]PolarPlot[{2Sin[2θ], Cos[2θ]}, {θ, 0, 2π}, PlotRangePadding -> 0.5, PolarAxes -> True, PolarAxesOrigin -> {{Bottom, Right}, Automatic}, PolarTicks -> {None, Automatic}]PolarGridLines (3)
PolarPlot[3Cos[3θ], {θ, 0, 2Pi}, PlotRangePadding -> 3, PolarAxes -> True, PolarGridLines -> Automatic]PolarPlot[3Cos[3θ], {θ, 0, 2Pi}, PlotRangePadding -> 2, PolarAxes -> True, PolarGridLines -> {{0, (2π/3), (4π/3)}, Automatic}, PolarTicks -> {{0, (2π/3), (4π/3)}, Automatic}]PolarPlot[3Cos[3θ], {θ, 0, 2Pi}, GridLinesStyle -> Orange, PlotRangePadding -> 2, PolarAxes -> True, PolarGridLines -> {{0, (2π/3), (4π/3)}, Automatic}, PolarTicks -> {{0, (2π/3), (4π/3)}, Automatic}]PolarTicks (3)
PolarPlot[1 - 2Sin[3θ], {θ, 0, 2Pi}, PlotRangePadding -> 4, PolarAxes -> True, PolarTicks -> Automatic]更改某些刻度的标签,使角度从
开始,到
结束,而不是
到
:
PolarPlot[1 - 2Sin[3θ], {θ, 0, 2Pi}, PlotRangePadding -> 4, PolarAxes -> True, PolarTicks -> {{0, (π/4), (π/2), (3 π/4), π, {(5 π/4), -(3π/4)}, {(3 π/2), -(π/2)}, {(7 π/4), -(π/4)}}, Automatic}]PolarPlot[1 - 3Sin[5θ], {θ, 0, 2Pi}, PlotRangePadding -> 2, PolarAxes -> True, PolarTicks -> {"Degrees", Range[0, 5]}]RegionFunction (1)
ScalingFunctions (8)
默认情况下,PolarPlot 在两个坐标轴上使用线性刻度:
PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, .9π}]只在定义了 Log 的区间上绘制对数图:
PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {None, "Log", None, None}, AspectRatio -> 1]PolarPlot[5Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {None, "SignedLog", None, None}, AspectRatio -> 1]用 ScalingFunctions 反转
轴坐标的方向:
PolarPlot[5Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {None, "Reverse", None, None}]PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {Automatic, "Reciprocal", None, None}, AspectRatio -> 1]PolarPlot[Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {Automatic, {Log[#]&, Exp[-#]&}, None, None}, AspectRatio -> 1]{PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> "SignedLog"], PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, .9π}, ScalingFunctions -> {Automatic, Automatic, Automatic, "SignedLog"}]}对 θ 进行缩放; 它会影响如何对绘图进行采样,但不会影响绘图的整体外观:
PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, 6}, Mesh -> 20, MeshStyle -> Red]PolarPlot[5 Sin[4 θ] Cos[3 θ], {θ, 0, 6}, ScalingFunctions -> {Automatic, Automatic, "Log", Automatic}, Mesh -> 20, MeshStyle -> Red]Ticks (9)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> None]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {Automatic, None}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{-1, 0.5, 1}, {-1, .5, 1}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{{-1, -a}, {0.5, b}, {1, a}}, {{-1, -a}, {1, a}}}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{{-1, -a}, {0.5, b}, {1, a}}, Automatic}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{{-1, -a, .4}, {0.5, b, .15}, {1, a, .2}}, Automatic}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{{-1, -a, {.4, .4}}, {0.5, b, {.15, .15}}, {1, a, {.2, .2}}}, Automatic}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {{{-1, -a, {.4, .4}, Directive[Thick, Darker@Green]}, {0.5, b, {.15, .15}, Directive[Thick, Red]}, {1, a, {.2, .2}, Directive[Thick, Blue, Dashed]}}, Automatic}]minMeanMax[min_, max_] := {{min, min}, {(max + min) / 2, (max + min) / 2}, {max, max}}PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, Ticks -> {minMeanMax, minMeanMax}, PlotRangePadding -> None]TicksStyle (4)
PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, AxesStyle -> Red]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, TicksStyle -> Red]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, TicksStyle -> {Directive[Blue, Thick], Directive[Red]}]PolarPlot[5Sin[2 θ] Cos[ 2θ], {θ, 0 , π}, TicksStyle -> Directive[Red, Thick], LabelStyle -> Blue]应用 (4)
PolarPlot[1, {θ, 0, 2Pi}]PolarPlot[θ, {θ, 0, 2Pi}]PolarPlot[1 + 1 / 10 Sin[10θ], {θ, 0, 2Pi}]{PolarPlot[θ ^ (1 / 2), {θ, 0, 20}, Frame -> True, PlotLabel -> r == θ ^ (1 / 2)],
PolarPlot[θ, {θ, 0, 20}, Frame -> True, PlotLabel -> r == θ]}{PolarPlot[θ ^ -1, {θ, 0.1, 25}, PlotRange -> {{-1 / 2, 2.5}, All}, Frame -> True, PlotLabel -> r == θ ^ -1],
PolarPlot[θ ^ (-1 / 2), {θ, 0.1, 25}, PlotRange -> {{-3 / 5, 2.5}, All}, Frame -> True, PlotLabel -> r == θ ^ (-1 / 2)]}PolarPlot[E ^ (θ / 10), {θ, 0, 30}, Frame -> True, PlotLabel -> r == E ^ (θ / 10)]创建一个 Guilloché 模式 [更多信息]:
guilloche[{a_, b_, c_, d_, e_, f_}, o : OptionsPattern[]] := PolarPlot[Evaluate[Flatten[{Table[(c + Sin[a x + d]) + ((b + Sin[b x + e]) - (c + Sin[a x + d])) (f + Sin[a x + n / Pi]) / 2, {n, 0, 19}]}]], {x, 0, 2 Pi}, o, Axes -> None, Frame -> False]guilloche[{4, 8, 20, 4.7, 1.8, 1}, PlotStyle -> Darker[Green, 0.5]]属性和关系 (5)
在曲线方面,PolarPlot 是一个 ParametricPlot 的特例:
{PolarPlot[θ, {θ, 0, 4Pi}], ParametricPlot[{θ Cos[θ], θ Sin[θ]}, {θ, 0, 4Pi}]}对于数据使用 ListPolarPlot:
{ListPolarPlot[Table[θ, {θ, 0, 2Pi, 0.1}]], PolarPlot[θ, {θ, 0, 2Pi}]}对于函数和参数表面,用 Plot3D 和 ParametricPlot3D:
Plot3D[(x ^ 2 + y ^ 2)Exp[-(x ^ 2 + y ^ 2)], {x, -2, 2}, {y, -2, 2}]ParametricPlot3D[{-2 Cos[u] Cos[v] ^ 3, -2 Cos[v] ^ 2 Sin[u], 2 Tan[v]}, {u, 0, 2Pi}, {v, -1, 1}]对于圆柱坐标和球坐标,使用 RevolutionPlot3D 和 SphericalPlot3D:
RevolutionPlot3D[-(ϕ + Sin[r]), {r, 0, 4Pi}, {ϕ, 0, 2Pi}]SphericalPlot3D[1 + 1 / 5Sin[3v], {u, 0, Pi}, {v, 0, 2Pi}]对于隐式的曲线和区域,使用 ContourPlot 和 RegionPlot:
{ContourPlot[x ^ 2 + y ^ 2 == 4, {x, -2, 2}, {y, -2, 2}], RegionPlot[1 < x ^ 2 + y ^ 2 < 4, {x, -2, 2}, {y, -2, 2}]}巧妙范例 (1)
PolarPlot[Exp[Cos[θ]] - 2Cos[4θ] + Sin[θ / 12]^5, {θ, 0, 20π}]PolarPlot[Evaluate[Table[Abs[Sin[θ + i]], {i, 0, 2Pi, 2Pi / 16}]], {θ, 0, 2Pi}, PlotStyle -> Thick, ColorFunction -> Function[{x, y, t, r}, Hue[r]], Axes -> False, RegionFunction -> Function[{x, y, t, r}, r < 0.555], ColorFunctionScaling -> False, PlotPoints -> 20, MaxRecursion -> 3]技术笔记
-
▪
- 一些特殊图形
文本
Wolfram Research (2007),PolarPlot,Wolfram 语言函数,https://reference.wolfram.com/language/ref/PolarPlot.html (更新于 2026 年).
CMS
Wolfram 语言. 2007. "PolarPlot." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2026. https://reference.wolfram.com/language/ref/PolarPlot.html.
APA
Wolfram 语言. (2007). PolarPlot. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/PolarPlot.html 年
BibTeX
@misc{reference.wolfram_2026_polarplot, author="Wolfram Research", title="{PolarPlot}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/PolarPlot.html}", note=[Accessed: 31-October-2026]}
BibLaTeX
@online{reference.wolfram_2026_polarplot, organization={Wolfram Research}, title={PolarPlot}, year={2026}, url={https://reference.wolfram.com/language/ref/PolarPlot.html}, note=[Accessed: 31-October-2026]}