Re: Plotting Locators with Color
- To: mathgroup at smc.vnet.net
 - Subject: [mg118115] Re: Plotting Locators with Color
 - From: Heike Gramberg <heike.gramberg at gmail.com>
 - Date: Tue, 12 Apr 2011 06:53:55 -0400 (EDT)
 
I don't know any way to change the colour of the default locator, but 
you can replace the default locators with anything you like using the
Appearance option of LocatorPane:
Manipulate[
 LocatorPane[pts; Dynamic@pts, 
  Dynamic@Graphics[{Spline[pts, Bezier]}, Axes -> True, 
    AxesLabel -> {x, y}, PlotRange -> {{-3, 3}, {-3, 3}}, 
    Background -> LightOrange],
  Appearance -> (Graphics[{#, Disk[]}, ImageSize -> 15] &) /@ {Blue, 
     Red, Green, Brown}], {{pts, {{0, 0}, {0, 2}, {2, 0}, {2, 
     2}}}, {-3, -3}, {3, 3}, ControlType -> None}, 
 SaveDefinitions -> True, Initialization :> {Needs["Splines`"]}, 
 AutorunSequencing -> {2}]
Heike
On 12 Apr 2011, at 10:54, Bill wrote:
> Hi:
> 
> I'm using Mathematica 8.0.1. on a PC with the following code:
> 
> Manipulate[
> LocatorPane[pts; Dynamic@pts, 
>  Dynamic@Graphics[{Spline[pts, Bezier]}, Axes -> True, 
>    AxesLabel -> {x, y}, PlotRange -> {{-3, 3}, {-3, 3}}, 
>    Background -> LightOrange]], {{pts, {{0, 0}, {0, 2}, {2, 0}, {2, 
>     2}}}, {-3, -3}, {3, 3}, ControlType -> None}, 
> SaveDefinitions -> True, Initialization :> {Needs["Splines`"]}, 
> AutorunSequencing -> {2}]
> 
> How can I plot this with each locator plotted in a  different color?
> 
> 
> Thanks,
> 
> Bill
>