MathGroup Archive 2009

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

Search the Archive

Re: DateListPlot & Locator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103676] Re: [mg103666] DateListPlot & Locator
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Fri, 2 Oct 2009 08:23:03 -0400 (EDT)
  • References: <200910011133.HAA25771@smc.vnet.net>

Hi,

what about,

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

and reading the documentation of DateList, AbsoluteTime, ... and maybe
the "Date and Time Functions" tutorial (tutorial/DateAndTimeFunctions)?

Cheers
Patrick


On Thu, 2009-10-01 at 07:33 -0400, Ulrich Arndt 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: DateListPlot & Locator
  • Next by Date: generating submultisets with repeated elements
  • Previous by thread: DateListPlot & Locator
  • Next by thread: Re: DateListPlot & Locator