在From Cartesian Plot to Polar Histogram using Mathematica的基础上,我想定制R轴和θ轴:
请考虑:
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完成了这项工作。我找不到一种方法来保持表格,以获得主要的theta轴,并绘制另一个不同的颜色。

3/I无法使用Prolog将Customsize Backgroud in Plot within Mathematica上提供的解决方案改编为极坐标图。有没有可能把图外圈内的区域涂成灰色呢?
发布于 2011-09-19 01:45:34
您可以使用Epilog为背景创建线条和Prolog,例如
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]]]],
Epilog -> {Red, Thick, Line[{{0, 0}, 5/Sqrt[2] {1, 1}}]},
Prolog -> {Gray, Disk[{0, 0}, 5]}]]

https://stackoverflow.com/questions/7462686
复制相似问题