If I have a Manipulate statement, such as:
Manipulate[
Graphics[Line[{{0, 0}, pt}], PlotRange -> 2], {{pt, {1, 1}},
Locator}]
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.
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}]
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.
Try adding Appearance -> None
to the Locator control:
Manipulate[
Graphics[
Line[{{0, 0}, pt}]
, PlotRange -> 2
]
, {{pt, {1, 1}}, Locator, Appearance -> None}
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With