PolarTicks、Polar GridLines 和 PolarTicks背景定制
建立在 使用 Mathematica 从笛卡尔图到极坐标直方图 我想自定义 R 轴和 theta 轴:
请考虑:
list = {{21, 16}, {16, 14}, {11, 11}, {11, 12}, {13, 15}, {18,17}, {19, 11}, {17, 16}, {16, 19}}
Module[{Countz, maxScale, angleDivisions, dAng},
maxScale = 4;
angleDivisions = 12;
dAng = (2 \[Pi])/angleDivisions;
Countz = BinCounts[ Flatten@Map[ArcTan @@ (# - ScreenCenter) &, list, {1}],
{-Pi, Pi,dAng}];
SectorChart[{ConstantArray[1, Length[Countz]], Countz}\[Transpose],
SectorOrigin -> {-\[Pi]/angleDivisions, "Counterclockwise"},
PolarAxes -> True, PolarGridLines -> {Automatic, {1, 2, 3, 4, 5}},
PolarAxesOrigin -> {Pi/2, 5},
PolarTicks -> {Table[{i \[Degree] + \[Pi]/angleDivisions, i \[Degree]},
{i, 0, 345, 30}], Range[5]},
ChartStyle -> {Directive[EdgeForm[{Black, Thickness[0.005]}], Red]},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, ImageSize -> 400,
ChartElementFunction -> Function[{range},
Disk[{0, 0}, range[[2, 2]], -11 Pi/12 + range[[1]]]]]]
2/我想添加一个45度角的“theta bar”(如图所示)。不过我是用ppt做到的。我找不到一种方法来保留表格来获取主θ轴并绘制另一个不同颜色的轴。
3/我未能适应 使用 Prolog 将 Mathematica 中的绘图中的背景自定义为极坐标图。是否可以将绘图外圆内的区域涂成灰色?
Building up on
From Cartesian Plot to Polar Histogram using Mathematica I would like to customize the R and theta Axes :
please consider :
list = {{21, 16}, {16, 14}, {11, 11}, {11, 12}, {13, 15}, {18,17}, {19, 11}, {17, 16}, {16, 19}}
Module[{Countz, maxScale, angleDivisions, dAng},
maxScale = 4;
angleDivisions = 12;
dAng = (2 \[Pi])/angleDivisions;
Countz = BinCounts[ Flatten@Map[ArcTan @@ (# - ScreenCenter) &, list, {1}],
{-Pi, Pi,dAng}];
SectorChart[{ConstantArray[1, Length[Countz]], Countz}\[Transpose],
SectorOrigin -> {-\[Pi]/angleDivisions, "Counterclockwise"},
PolarAxes -> True, PolarGridLines -> {Automatic, {1, 2, 3, 4, 5}},
PolarAxesOrigin -> {Pi/2, 5},
PolarTicks -> {Table[{i \[Degree] + \[Pi]/angleDivisions, i \[Degree]},
{i, 0, 345, 30}], Range[5]},
ChartStyle -> {Directive[EdgeForm[{Black, Thickness[0.005]}], Red]},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, ImageSize -> 400,
ChartElementFunction -> Function[{range},
Disk[{0, 0}, range[[2, 2]], -11 Pi/12 + range[[1]]]]]]
2/I would like to add one "theta bar" colored at 45 Degree (as shown in the image). However I did that using ppt. I could not find a mean to keep the Table to get the main theta axes and draw another one colored differently.
3/I failed to adapt the solution provided on Customsize Backgroud in Plot within Mathematica to a Polarplot using Prolog. Is it possible to have the area within the outer circle of the plot colored in Gray let`s say ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
Epilog
创建线条和Prolog
作为背景,例如You could use
Epilog
to create the line andProlog
for the background, e.g.