在 Mathematica 中自定义绘图背景
考虑:
ListPlot[Range[10],
Background -> Gray,
PlotLabel -> "I don`t want the background here !"]
有没有办法将背景仅应用于实际绘图区域?
不在轴上,不在标签后面。那么在这种情况下基本上是矩形 {{0,0},{10,10}} 吗?
编辑:我们可以使用 PolarListPlot 做同样的事情吗?
使用 Sjoerd 解决方案使用 Mathematica 从笛卡尔图到极坐标直方图:
dalist = {{21, 22}, {26, 13}, {32, 17}, {31, 11}, {30, 9},
{25,12}, {12, 16}, {18, 20}, {13, 23}, {19, 21},
{14, 16}, {14,22}, {18, 22}, {10, 22}, {17, 23}}
ScreenCenter = {20, 15}
ListPolarPlot[{ArcTan[##],EuclideanDistance[##]} & @@@ (# - ScreenCenter & /@ dalist),
PolarAxes -> True, PolarGridLines -> Automatic, Joined -> False,
PolarTicks -> {"Degrees", Automatic},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, PlotStyle -> {Red, PointSize -> 0.02}]
Considering:
ListPlot[Range[10],
Background -> Gray,
PlotLabel -> "I don`t want the background here !"]
Is there any way to have the background applied solely to the actual plotting zone?
Not on the axis, not behind the label. So basically to the rectangle {{0,0},{10,10}} in that case?
EDIT: Can we do the Same using PolarListPlot?
Using Sjoerd Solution on From Cartesian Plot to Polar Histogram using Mathematica:
dalist = {{21, 22}, {26, 13}, {32, 17}, {31, 11}, {30, 9},
{25,12}, {12, 16}, {18, 20}, {13, 23}, {19, 21},
{14, 16}, {14,22}, {18, 22}, {10, 22}, {17, 23}}
ScreenCenter = {20, 15}
ListPolarPlot[{ArcTan[##],EuclideanDistance[##]} & @@@ (# - ScreenCenter & /@ dalist),
PolarAxes -> True, PolarGridLines -> Automatic, Joined -> False,
PolarTicks -> {"Degrees", Automatic},
BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold,
FontSize -> 12}, PlotStyle -> {Red, PointSize -> 0.02}]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你可以这样做:
You could do something like this:
您可以使用
Labeled
如You could use
Labeled
as in你可以这样做:
编辑
也许更好
You could do:
Edit
Perhaps better