MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Basic Locator question in a Manipulate...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83298] Re: Basic Locator question in a Manipulate...
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 17 Nov 2007 05:16:23 -0500 (EST)
  • References: <fhjsc2$517$1@smc.vnet.net>

David,

That seems like a bug or at least a feature. Manipulate, in trying to be all 
things to all people, is often difficult to use except for the quick simple 
cases. Serious Mathematica users should probably think in terms of 
DynamicModule from the start.

Is the following what you want?

DynamicModule[{p = {.5, .5}, q = {.5, .5}},
 Panel@Column[
   {LocatorPane[Dynamic[p], Graphics[{}, PlotRange -> 2]],
    LocatorPane[Dynamic[q], Graphics[{}, PlotRange -> 2]],
    Dynamic[p],
    Dynamic[q]}]
 ]


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"David Reiss" <dbreiss at gmail.com> wrote in message 
news:fhjsc2$517$1 at smc.vnet.net...
>I have an example like the following:
>
> Manipulate[Column[
>  {Graphics[Locator[Dynamic[p]], PlotRange -> 2],
>   Graphics[Locator[Dynamic[q]], PlotRange -> 2],
>   Dynamic[p],
>   Dynamic[q]}],
> {{p, {0.5, 0.5}}, Locator},
> {{q, {0.5, 0.5}}, Locator}]
>
> I find that there actually are 3 Locators or, more precisely, 3
> locator cross hairs: one which corresponds to the first locator (for
> p) and appears in the top graphic, and two others that are linked and
> correspond to the second parameter, q.  In the latter case one is in
> the top graphic and the other in the corresponding position in the
> bottom graphic.
>
> Actually, the first (single) Locator may actually be two overlaid that
> move in concert.  The color of that one is a darker Grey than the
> other two...
>
> So, is there something very basic that I am not understanding here?
>
> Ok, yes, perhaps I should "read the manual" but this is easier for the
> moment...  :-0)
>
> Thanks,
>
> David
> 



  • Prev by Date: Re: memory release problem in mathematica6.0
  • Next by Date: Get list of function variables?
  • Previous by thread: Basic Locator question in a Manipulate...
  • Next by thread: Re: Basic Locator question in a Manipulate...