Mathematica 9 is now available
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: [mg103690] Re: [mg103666] DateListPlot & Locator
  • From: Ulrich Arndt <ulrich.arndt at data2knowledge.de>
  • Date: Fri, 2 Oct 2009 08:25:41 -0400 (EDT)
  • References: <200910011133.HAA25771@smc.vnet.net>

Hi II,

got an answer from local support which might be worth to share.
The trick is to convert the date into an AbsoluteTime for the Locator  
and back to date if you what to see the new date...
Its working now like I expected.

dl = {DatePlus[#], RandomInteger[{1, 40}]} & /@ (Range[12] * -1)

Manipulate[
  DateListPlot[dl, Joined -> True],
  Dynamic[{DateList[ p1[[1]] ], p1[[2]]}],
  {{p1, {AbsoluteTime[dl[[4]][[1]]], dl[[4]][[2]]}}, Locator}
  ]

Ulrich

Am 01.10.2009 um 13:33 schrieb Ulrich Arndt:

> 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: generating submultisets with repeated elements
  • Next by Date: Re: How to store data files in packages
  • Previous by thread: Re: DateListPlot & Locator
  • Next by thread: Re: DateListPlot & Locator