Graphics PolarTicks、Polar GridLines&;后台定制
建立在 我想定制R轴和θ轴:Graphics PolarTicks、Polar GridLines&;后台定制,graphics,wolfram-mathematica,Graphics,Wolfram 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])/angleD
请考虑:
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度的“θ条”(如图所示)。不过我是用ppt做的。我找不到一个方法来保持桌子以获得主θ轴,并绘制另一个不同颜色的轴
3/I未能使用Prolog将提供的解决方案应用于Polarplot。是否可以将绘图外圆内的区域涂成灰色,比如说?您可以使用
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]}]]
您可以使用
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]}]]
Heike,我如何调整线的角度,让
s 37.5度?我不明白这条线在哪个坐标系。非常感谢。@500在结尾:line[{0,0},r{Cos@Phi,Sin@Phi}]
其中r
是半径,Phi
是半径angle@belisarius非常感谢。我认为它需要{}使之生效。而且我还是很困惑,角度对我来说都是度。phi应采用哪种格式?Heike,对于lets 37.5度,我如何调整线的角度?我不明白这条线在哪个坐标系。非常感谢。@500在结尾:line[{0,0},r{Cos@Phi,Sin@Phi}]
其中r
是半径,Phi
是半径angle@belisarius非常感谢。我认为它需要{}使之生效。而且我还是很困惑,角度对我来说都是度。phi应采用哪种格式?