Re: Help with DateListPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg82214] Re: Help with DateListPlot
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Mon, 15 Oct 2007 01:22:31 -0400 (EDT)
On 10/14/07 at 6:08 AM, KTugbawa at gmail.com wrote: >How do you use the DateList Plot function when you have a 3-vector >database. The first column is the date, the second column contains >the names, and the last column contains the returns. I know that you >have to use a loop.The data looks like this: >Date Item return >1/2/01 TBill 0.67 >1/3/01 SP 0.78 >1/4/01 inv 0.5 >1/5/01 inve 0.6 No loop is needed. For example, after putting the data into a Mathematica compatible format, i.e., data = {{"1/2/01", "TBill", 0.67}, {"1/3/01", "SP", 0.78}, {"1/4/01", "inv", 0.5}, {"1/5/01", "inve", 0.6}}; Simply doing DateListPlot[data[[All, {1, -1}]]] will generate a plot. There will be warnings since "1/2/01" could be Feb 1, 2001 or Jan 2, 2001. -- To reply via email subtract one hundred and four