polar_plot 函数
绘制极坐标曲线 r(theta)。
语法
polar_plot(rExpr, t = a..b)polar_plot(rExpr, t = a..b, option = value, ...)
参数与选项
expr | 要变换或求值的表达式。 |
|---|---|
range | 形如 x = a..b 的变量范围。 |
title | 图形上方显示的标题文本。 |
labels | 坐标轴或类别标签。2D 图通常为 [xLabel, yLabel];图表中在支持时用于标注分类。 |
legend | 单个数据系列的图例文本,或多个系列名称列表。 |
color / colour | 颜色名、CSS 颜色,或用于多个系列/图元的颜色列表。 |
style | 绘制风格:line 绘制连续线段,point 绘制采样点标记。 |
linestyle | 线型,例如 solid、dash、dot 或 dashdot。 |
thickness | 曲线、网格曲面和图元的线宽。 |
symbol | 点样式图中使用的点标记模式。 |
symbolsize | 采样点或显式点图元的标记半径。 |
axes | 坐标轴显示控制;使用 none/false 隐藏坐标轴。 |
gridlines | 网格线显示控制;true 显示,false 隐藏。 |
background | 图形背景颜色。 |
transparency | 透明度控制,范围 0 到 1,数值越大越透明。 |
view | 可见数值范围,例如 [xmin..xmax, ymin..ymax] 或 [xmin..xmax, ymin..ymax, zmin..zmax]。 |
numpoints / samples | 表达式绘图中使用的采样点数或网格采样数。 |
示例
- 极坐标曲线
polar_plot(1 + cos(t), t = 0..2*pi)绘制一条心形线形式的极坐标曲线。 - 标题
polar_plot(1 + cos(t), t = 0..2*pi, title = 'Cardioid')极坐标曲线带有指定标题。 - 坐标轴标签
polar_plot(1 + cos(t), t = 0..2*pi, labels = ['x', 'y'])转换后的直角坐标轴使用给定标签。 - 图例
polar_plot(1 + cos(t), t = 0..2*pi, legend = 'r = 1 + cos(t)')极坐标曲线带有说明性图例标签。 - 颜色
polar_plot(1 + cos(t), t = 0..2*pi, color = purple)曲线绘制为紫色。 - 点样式
polar_plot(1 + cos(t), t = 0..2*pi, style = point, symbolsize = 4, numpoints = 160)极坐标采样值以点显示。 - 线型
polar_plot(1 + cos(t), t = 0..2*pi, linestyle = dot)曲线使用点线线型。 - 线宽
polar_plot(1 + cos(t), t = 0..2*pi, thickness = 4)极坐标曲线使用更粗线宽。 - 坐标轴
polar_plot(1 + cos(t), t = 0..2*pi, axes = none)隐藏极坐标图的坐标轴线。 - 网格线
polar_plot(1 + cos(t), t = 0..2*pi, gridlines = false)隐藏网格线。 - 背景
polar_plot(1 + cos(t), t = 0..2*pi, background = '#fff7ed')绘图使用指定的暖色背景。 - 透明度
polar_plot(1 + cos(t), t = 0..2*pi, transparency = 0.25)曲线以部分透明效果显示。 - 显示范围
polar_plot(1 + cos(t), t = 0..2*pi, view = [-2..2, -2..2])将可见窗口固定在极坐标曲线周围。 - 综合选项
polar_plot(1 + cos(t), t = 0..2*pi, title = 'Polar', legend = 'cardioid', color = red, linestyle = dashdot, thickness = 3, view = [-2..2, -2..2], samples = 240)同时应用多项样式、范围和采样选项。