如何控制 Mathematica Manipulate 语句中定位器的外观?

发布于 2024-10-22 03:14:10 字数 288 浏览 2 评论 0原文

如果我有 Manipulate 语句,例如:

Manipulate[
 Graphics[Line[{{0, 0}, pt}], PlotRange -> 2], {{pt, {1, 1}}, 
  Locator}]

Mathematicagraphics

如何以最简单的方式更改 Locator 对象的外观可能的?我必须诉诸动态语句吗?具体来说,我想让定位器不可见。

If I have a Manipulate statement, such as:

Manipulate[
 Graphics[Line[{{0, 0}, pt}], PlotRange -> 2], {{pt, {1, 1}}, 
  Locator}]

Mathematica graphics

How do I change the appearance of the Locator object in the easiest way possible? Do I have to resort to Dynamic statements? Specifically, I would have liked to make the Locator invisible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风渺 2024-10-29 03:14:10

除了WReach 的回答:在正常的 Locator 调用中,其外观可以作为参数之一给出。当在 Manipulate 中使用时,这是不可能的。但是,Appearance 可用于绘制其他定位符号。

a = Graphics[{Red, Table[Circle[{0, 0}, i], {i, 3}]}, ImageSize -> 20];
Manipulate[
 Graphics[Line[{{0, 0}, pt}], PlotRange -> 2], {{pt, {1, 1}}, Locator,
   Appearance -> a}]

Mathematicagraphics

我认为这没有记录。去年我尝试找出如何做到这一点,但找不到方法。我在matheca 新闻组也可以。

In addition to WReach's answer: In a normal Locator call its appearance can be given as one of the arguments. When used in a Manipulate this is not possible. However, Appearance can be used to draw other locator symbols.

a = Graphics[{Red, Table[Circle[{0, 0}, i], {i, 3}]}, ImageSize -> 20];
Manipulate[
 Graphics[Line[{{0, 0}, pt}], PlotRange -> 2], {{pt, {1, 1}}, Locator,
   Appearance -> a}]

Mathematica graphics

I don't think this is documented. Last year I tried finding out how to do this, but couldn't find a way. Got no response on my question on the mathematica newsgroup either.

开始看清了 2024-10-29 03:14:10

尝试添加 Appearance ->定位器控件无

Manipulate[
  Graphics[
    Line[{{0, 0}, pt}]
  , PlotRange -> 2
  ]
, {{pt, {1, 1}}, Locator, Appearance -> None}
]

Try adding Appearance -> None to the Locator control:

Manipulate[
  Graphics[
    Line[{{0, 0}, pt}]
  , PlotRange -> 2
  ]
, {{pt, {1, 1}}, Locator, Appearance -> None}
]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文