I have a TemporalData object that has td["ValueDimensions"] =3. Right now I only have one sample, K=1. So the following example is the simplest case, dim=3 and K=1. To begin with, I just want to plot each dimension separately. Should be trivial but it seems I have to twist the td object into knots to get the time dimension to show correctly...

 ts = {{{0.`, {1.333999006891247`, 12.053810602014542`, 
 87.94618939798545`}}, {0.1`, {1.3514434090695817`, 
 86.53455823856495`}}, {0.2`, {1.2484079436257138`, 
 92.89743502043808`}}, {0.30000000000000004`, \
 {1.3781565261854645`, 12.184908506564101`, 
 84.45147211241067`}}, {0.4`, {1.3285491537059095`, 
 87.1154457958651`}}, {0.5`, {1.353124500190124`, 
 85.38069968635773`}}, {0.6000000000000001`, {1.4134624696453986`,
 81.70867228313669`}}, {0.7000000000000001`, {1.195964818586219`, 
 94.68144692187659`}}, {0.8`, {1.2736346893937893`, 
 89.29573476671187`}}, {0.9`, {1.0705151506735828`, 
 103.2366857670525`}}, {1.`, {0.9802798326333646`, 
 13.00862708606569`, 110.54583685327417`}}}}
tds = TemporalData[ts]
(* Pols suggests if "ValuesDimension" returns 3 then this would just work *)
ListLinePlot[td["Values", 1]]
ListLinePlot[td["Values", 2]]
ListLinePlot[td["Values", 3]]

(* The following shows on dimension for the one path, but feels wrong on so many levels, e.g. the time dimension has been lost*)
tds["ValueList"][[1, All, 1]] // ListLinePlot

Once I can do this, I'd like to generate (using ItoProcess) K paths instead of just one, and then I'd like to plot each of these.

Would appreciate any hints or tips about how to do this elegantly.


1 Answer 1


The following is undocumented:


enter image description here

ListLinePlot @ tds["PathComponents"]

enter image description here

Plot component 3 only

ListLinePlot @ tds["PathComponent", 3]  
(* or *) ListLinePlot @ tds["PathComponents"][[3]]

enter image description here

The property "PathComponent" and the form tds["PathComponent", componentnumber] are undocumented.

Both "PathComponents" nor PathComponent" work in versions 9.0, 11.3 and 12.0 although neither appear in the property list:


{Components, DateList, DatePath, DatePaths, Dates, FirstDates, FirstTimes, FirstValues, LastDates, LastTimes, LastValues, Part,Path, PathCount, PathFunction, PathFunctions, PathLength, PathLengths, Paths, PathTimes, SliceData, SliceDistribution, TimeList, Times, ValueDimensions, ValueList, Values}

  • $\begingroup$ Many thanks. Could you add "The following is undocumented:" as the first line. This will forewarn others in case wolfram change this behavior to some thing else undocumented. Then I'll accept the answer. I'm the OP and I was annoyed with myself . Its reasonable others think "The lazy so-and-so. Why didn't he just read the docs about this". Any insight into how to elegantly select dimension M of sample/Simulation K. $\endgroup$
    – Hedgehog
    Dec 31, 2017 at 20:02
  • $\begingroup$ @Hedgehog, done. $\endgroup$
    – kglr
    Dec 31, 2017 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.