Re: Plotting date-time series in 3D how to handle date-time to plot

• To: mathgroup at smc.vnet.net
• Subject: [mg106660] Re: Plotting date-time series in 3D how to handle date-time to plot
• From: "Hans Michel" <hmichel at cox.net>
• Date: Wed, 20 Jan 2010 06:49:49 -0500 (EST)
• References: <hj40n2\$sed\$1@smc.vnet.net>

```Kurt:

It seems that you are doing work in Excel anyway to get the date into a
Mathematica date list format.

Why not keep the date in Excel internal serialized date format.
See http://www.cpearson.com/excel/datetime.htm

If you wish to convert that number to Mathematica date while in Mathematica
then you can see
http://forums.wolfram.com/mathgroup/archive/2004/May/msg00523.html

ToDate[(38132 + 2)*(60*60*24)]

ToDate[(excel serialdate here + 2)*(60*60*24)]

If the work is already done to go from excel date to mathematica date list,
then you can look into the following functions:
FromDate function or AbsoluteTime function in mathematica

If you wish to transform the date list to Julian day then see
http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/

The Calendrica Package from edition have some serialized date formats like
RD or JD or MJD.

After serializing the dates, you will have numbers that ListPlot3D can deal
with.

Hans

"Canopus56" <canopus56 at yahoo.com> wrote in message
news:hj40n2\$sed\$1 at smc.vnet.net...
>I have a year's worth of time series data that I would like to plot in 3d
>using ListPlot3D. ListPlot3D does not accept the system formatted dates
>like the 2D utility DateListPlot.
>
> Q1. What is the best way to plot this type of time series in 3D where the
> date-times may cross January 1 and two or more years?
>
> A week's worth of data is appended.
>
> I have previously been doing this by converting raw csv data file's
> date-time to a Julian Day in Excel and then importing to Mathematica.  I
> would like to simplify things by doing the entire import and plot routine
> in Mathematica directly on the raw data csv file.
>
> Thanks for your help. - Kurt
>
> lstTriple = {{{2009, 12, 15, 0, 0, 0.}, 0, -0.7252}, {{2009, 12, 15, 1, 0,
> 0.},
> 1, -10.926}, {{2009, 12, 15, 2, 0, 0.},
> 2, -21.7816}, {{2009, 12, 15, 3, 0, 0.},
> 3, -33.0166}, {{2009, 12, 15, 4, 0, 0.},
> 4, -44.3585}, {{2009, 12, 15, 5, 0, 0.},
> 5, -55.4223}, {{2009, 12, 15, 6, 0, 0.},
> 6, -65.3759}, {{2009, 12, 15, 7, 0, 0.},
> 7, -71.8831}, {{2009, 12, 15, 8, 0, 0.},
> 8, -70.8447}, {{2009, 12, 15, 9, 0, 0.},
> 9, -63.1364}, {{2009, 12, 15, 10, 0, 0.},
> 10, -52.7841}, {{2009, 12, 15, 11, 0, 0.},
> 11, -41.6044}, {{2009, 12, 15, 12, 0, 0.},
> 12, -30.2628}, {{2009, 12, 15, 13, 0, 0.},
> 13, -19.0995}, {{2009, 12, 15, 14, 0, 0.},
> 14, -8.3809}, {{2009, 12, 15, 15, 0, 0.}, 15,
> 1.6071}, {{2009, 12, 15, 16, 0, 0.}, 16,
> 10.5065}, {{2009, 12, 15, 17, 0, 0.}, 17,
> 17.8571}, {{2009, 12, 15, 18, 0, 0.}, 18,
> 23.1082}, {{2009, 12, 15, 19, 0, 0.}, 19,
> 25.72}, {{2009, 12, 15, 20, 0, 0.}, 20,
> 25.3619}, {{2009, 12, 15, 21, 0, 0.}, 21,
> 22.082}, {{2009, 12, 15, 22, 0, 0.}, 22,
> 16.2805}, {{2009, 12, 15, 23, 0, 0.}, 23,
> 8.5148}, {{2009, 12, 16, 0, 0, 0.},
> 0, -0.6809}, {{2009, 12, 16, 1, 0, 0.},
> 1, -10.8716}, {{2009, 12, 16, 2, 0, 0.},
> 2, -21.7206}, {{2009, 12, 16, 3, 0, 0.},
> 3, -32.9522}, {{2009, 12, 16, 4, 0, 0.},
> 4, -44.2945}, {{2009, 12, 16, 5, 0, 0.},
> 5, -55.3652}, {{2009, 12, 16, 6, 0, 0.},
> 6, -65.3402}, {{2009, 12, 16, 7, 0, 0.},
> 7, -71.9011}, {{2009, 12, 16, 8, 0, 0.},
> 8, -70.9291}, {{2009, 12, 16, 9, 0, 0.},
> 9, -63.2465}, {{2009, 12, 16, 10, 0, 0.},
> 10, -52.9002}, {{2009, 12, 16, 11, 0, 0.},
> 11, -41.7218}, {{2009, 12, 16, 12, 0, 0.},
> 12, -30.38}, {{2009, 12, 16, 13, 0, 0.},
> 13, -19.2154}, {{2009, 12, 16, 14, 0, 0.},
> 14, -8.4942}, {{2009, 12, 16, 15, 0, 0.}, 15,
> 1.4982}, {{2009, 12, 16, 16, 0, 0.}, 16,
> 10.4049}, {{2009, 12, 16, 17, 0, 0.}, 17,
> 17.7668}, {{2009, 12, 16, 18, 0, 0.}, 18,
> 23.0345}, {{2009, 12, 16, 19, 0, 0.}, 19,
> 25.6681}, {{2009, 12, 16, 20, 0, 0.}, 20,
> 25.335}, {{2009, 12, 16, 21, 0, 0.}, 21,
> 22.0799}, {{2009, 12, 16, 22, 0, 0.}, 22,
> 16.3002}, {{2009, 12, 16, 23, 0, 0.}, 23,
> 8.552}, {{2009, 12, 17, 0, 0, 0.},
> 0, -0.6305}, {{2009, 12, 17, 1, 0, 0.},
> 1, -10.8118}, {{2009, 12, 17, 2, 0, 0.},
> 2, -21.6544}, {{2009, 12, 17, 3, 0, 0.},
> 3, -32.8826}, {{2009, 12, 17, 4, 0, 0.},
> 4, -44.2253}, {{2009, 12, 17, 5, 0, 0.},
> 5, -55.3024}, {{2009, 12, 17, 6, 0, 0.},
> 6, -65.2976}, {{2009, 12, 17, 7, 0, 0.},
> 7, -71.9107}, {{2009, 12, 17, 8, 0, 0.},
> 8, -71.0062}, {{2009, 12, 17, 9, 0, 0.},
> 9, -63.3515}, {{2009, 12, 17, 10, 0, 0.},
> 10, -53.0123}, {{2009, 12, 17, 11, 0, 0.},
> 11, -41.8355}, {{2009, 12, 17, 12, 0, 0.},
> 12, -30.4934}, {{2009, 12, 17, 13, 0, 0.},
> 13, -19.3273}, {{2009, 12, 17, 14, 0, 0.},
> 14, -8.6031}, {{2009, 12, 17, 15, 0, 0.}, 15,
> 1.3943}, {{2009, 12, 17, 16, 0, 0.}, 16,
> 10.309}, {{2009, 12, 17, 17, 0, 0.}, 17,
> 17.683}, {{2009, 12, 17, 18, 0, 0.}, 18,
> 22.9678}, {{2009, 12, 17, 19, 0, 0.}, 19,
> 25.6237}, {{2009, 12, 17, 20, 0, 0.}, 20,
> 25.3157}, {{2009, 12, 17, 21, 0, 0.}, 21,
> 22.0853}, {{2009, 12, 17, 22, 0, 0.}, 22,
> 16.3269}, {{2009, 12, 17, 23, 0, 0.}, 23,
> 8.5956}, {{2009, 12, 18, 0, 0, 0.},
> 0, -0.5742}, {{2009, 12, 18, 1, 0, 0.},
> 1, -10.7464}, {{2009, 12, 18, 2, 0, 0.},
> 2, -21.5829}, {{2009, 12, 18, 3, 0, 0.},
> 3, -32.8081}, {{2009, 12, 18, 4, 0, 0.},
> 4, -44.151}, {{2009, 12, 18, 5, 0, 0.},
> 5, -55.234}, {{2009, 12, 18, 6, 0, 0.},
> 6, -65.2482}, {{2009, 12, 18, 7, 0, 0.},
> 7, -71.9119}, {{2009, 12, 18, 8, 0, 0.},
> 8, -71.0759}, {{2009, 12, 18, 9, 0, 0.},
> 9, -63.4512}, {{2009, 12, 18, 10, 0, 0.},
> 10, -53.1202}, {{2009, 12, 18, 11, 0, 0.},
> 11, -41.9454}, {{2009, 12, 18, 12, 0, 0.},
> 12, -30.6029}, {{2009, 12, 18, 13, 0, 0.},
> 13, -19.435}, {{2009, 12, 18, 14, 0, 0.},
> 14, -8.7074}, {{2009, 12, 18, 15, 0, 0.}, 15,
> 1.2956}, {{2009, 12, 18, 16, 0, 0.}, 16,
> 10.2189}, {{2009, 12, 18, 17, 0, 0.}, 17,
> 17.6057}, {{2009, 12, 18, 18, 0, 0.}, 18,
> 22.9083}, {{2009, 12, 18, 19, 0, 0.}, 19,
> 25.5868}, {{2009, 12, 18, 20, 0, 0.}, 20,
> 25.304}, {{2009, 12, 18, 21, 0, 0.}, 21,
> 22.098}, {{2009, 12, 18, 22, 0, 0.}, 22,
> 16.3605}, {{2009, 12, 18, 23, 0, 0.}, 23,
> 8.6455}, {{2009, 12, 19, 0, 0, 0.},
> 0, -0.5121}, {{2009, 12, 19, 1, 0, 0.},
> 1, -10.6756}, {{2009, 12, 19, 2, 0, 0.},
> 2, -21.5065}, {{2009, 12, 19, 3, 0, 0.},
> 3, -32.7286}, {{2009, 12, 19, 4, 0, 0.},
> 4, -44.0717}, {{2009, 12, 19, 5, 0, 0.},
> 5, -55.1602}, {{2009, 12, 19, 6, 0, 0.},
> 6, -65.1923}, {{2009, 12, 19, 7, 0, 0.},
> 7, -71.9049}, {{2009, 12, 19, 8, 0, 0.},
> 8, -71.1382}, {{2009, 12, 19, 9, 0, 0.},
> 9, -63.5455}, {{2009, 12, 19, 10, 0, 0.},
> 10, -53.2237}, {{2009, 12, 19, 11, 0, 0.},
> 11, -42.0512}, {{2009, 12, 19, 12, 0, 0.},
> 12, -30.7084}, {{2009, 12, 19, 13, 0, 0.},
> 13, -19.5384}, {{2009, 12, 19, 14, 0, 0.},
> 14, -8.807}, {{2009, 12, 19, 15, 0, 0.}, 15,
> 1.2021}, {{2009, 12, 19, 16, 0, 0.}, 16,
> 10.1347}, {{2009, 12, 19, 17, 0, 0.}, 17,
> 17.5349}, {{2009, 12, 19, 18, 0, 0.}, 18,
> 22.856}, {{2009, 12, 19, 19, 0, 0.}, 19,
> 25.5574}, {{2009, 12, 19, 20, 0, 0.}, 20,
> 25.3}, {{2009, 12, 19, 21, 0, 0.}, 21,
> 22.1181}, {{2009, 12, 19, 22, 0, 0.}, 22,
> 16.401}, {{2009, 12, 19, 23, 0, 0.}, 23,
> 8.7018}, {{2009, 12, 20, 0, 0, 0.},
> 0, -0.4442}, {{2009, 12, 20, 1, 0, 0.},
> 1, -10.5995}, {{2009, 12, 20, 2, 0, 0.},
> 2, -21.425}, {{2009, 12, 20, 3, 0, 0.},
> 3, -32.6443}, {{2009, 12, 20, 4, 0, 0.},
> 4, -43.9875}, {{2009, 12, 20, 5, 0, 0.},
> 5, -55.0811}, {{2009, 12, 20, 6, 0, 0.},
> 6, -65.1298}, {{2009, 12, 20, 7, 0, 0.},
> 7, -71.8895}, {{2009, 12, 20, 8, 0, 0.},
> 8, -71.1929}, {{2009, 12, 20, 9, 0, 0.},
> 9, -63.6343}, {{2009, 12, 20, 10, 0, 0.},
> 10, -53.3227}, {{2009, 12, 20, 11, 0, 0.},
> 11, -42.1529}, {{2009, 12, 20, 12, 0, 0.},
> 12, -30.8097}, {{2009, 12, 20, 13, 0, 0.},
> 13, -19.6374}, {{2009, 12, 20, 14, 0, 0.},
> 14, -8.9018}, {{2009, 12, 20, 15, 0, 0.}, 15,
> 1.114}, {{2009, 12, 20, 16, 0, 0.}, 16,
> 10.0564}, {{2009, 12, 20, 17, 0, 0.}, 17,
> 17.4708}, {{2009, 12, 20, 18, 0, 0.}, 18,
> 22.8108}, {{2009, 12, 20, 19, 0, 0.}, 19,
> 25.5357}, {{2009, 12, 20, 20, 0, 0.}, 20,
> 25.3035}, {{2009, 12, 20, 21, 0, 0.}, 21,
> 22.1455}, {{2009, 12, 20, 22, 0, 0.}, 22,
> 16.4482}, {{2009, 12, 20, 23, 0, 0.}, 23,
> 8.7644}, {{2009, 12, 21, 0, 0, 0.},
> 0, -0.3706}, {{2009, 12, 21, 1, 0, 0.},
> 1, -10.5182}, {{2009, 12, 21, 2, 0, 0.},
> 2, -21.3387}, {{2009, 12, 21, 3, 0, 0.},
> 3, -32.5553}, {{2009, 12, 21, 4, 0, 0.},
> 4, -43.8986}, {{2009, 12, 21, 5, 0, 0.},
> 5, -54.9968}, {{2009, 12, 21, 6, 0, 0.},
> 6, -65.061}, {{2009, 12, 21, 7, 0, 0.},
> 7, -71.866}, {{2009, 12, 21, 8, 0, 0.},
> 8, -71.2399}, {{2009, 12, 21, 9, 0, 0.},
> 9, -63.7174}, {{2009, 12, 21, 10, 0, 0.},
> 10, -53.4171}, {{2009, 12, 21, 11, 0, 0.},
> 11, -42.2503}, {{2009, 12, 21, 12, 0, 0.},
> 12, -30.9068}, {{2009, 12, 21, 13, 0, 0.},
> 13, -19.732}, {{2009, 12, 21, 14, 0, 0.},
> 14, -8.9916}, {{2009, 12, 21, 15, 0, 0.}, 15,
> 1.0313}, {{2009, 12, 21, 16, 0, 0.}, 16,
> 9.9842}, {{2009, 12, 21, 17, 0, 0.}, 17,
> 17.4133}, {{2009, 12, 21, 18, 0, 0.}, 18,
> 22.773}, {{2009, 12, 21, 19, 0, 0.}, 19,
> 25.5215}, {{2009, 12, 21, 20, 0, 0.}, 20,
> 25.3146}, {{2009, 12, 21, 21, 0, 0.}, 21,
> 22.1802}, {{2009, 12, 21, 22, 0, 0.}, 22,
> 16.5023}, {{2009, 12, 21, 23, 0, 0.}, 23, 8.8331}}
>
>

```

• Prev by Date: Re: Re: More /.{I->-1} craziness
• Next by Date: Re: Re: More /.{I->-1} craziness. Schools are conservative. So are
• Previous by thread: Re: Plotting date-time series in 3D how to handle date-time to plot
• Next by thread: Re: Re: Plotting date-time series in 3D how to handle date-time to plot