Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: DateListPlot & Locator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103683] Re: DateListPlot & Locator
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Fri, 2 Oct 2009 08:24:24 -0400 (EDT)
  • References: <ha242a$p5i$1@smc.vnet.net>

Hi Ulrich,

The date is in AbsoluteTime format. You can convert it using DateList
like this:

dl = {DatePlus[#], RandomInteger[{1, 40}]} & /@ (Range[12]*-1);
Manipulate[
 {
   DateListPlot[dl, Joined -> True],
   Dynamic[{DateList[p1[[1, 1]]], p1[[1, 2]]}]
   } // Column,
 {{p1, dl[[4]]}, Locator}
 ]

Cheers -- Sjoerd

On Oct 1, 1:33 pm, Ulrich Arndt <ulrich.ar... at data2knowledge.de>
wrote:
> Hi all,
>
> I am working with mathematica 7 - just started...
> Is it possible to use Locator with DateListPlot?
>
> dl = {DatePlus[#], RandomInteger[{1, 40}]} & /@ (Range[12] * -1)
> Manipulate[
>   DateListPlot[dl, Joined -> True],
>   Dynamic[p1],
>   {{p1, dl[[4]]}, Locator}]
>
> is at least not doing what I expected.
> The varibale p1 is set correctly but not placed correctly and if you  
> move the locator p1[[1]] is changed from a date to a real...
>
> Kind regards Ulrich



  • Prev by Date: Re: How to =B1?
  • Next by Date: Re: DateListPlot & Locator
  • Previous by thread: Re: DateListPlot & Locator
  • Next by thread: Re: DateListPlot & Locator