Group Abstract Group Abstract

Message Boards Message Boards

Can I import and plot more than one timeseries in one file?

Posted 10 years ago
POSTED BY: Andrew Lewis
3 Replies

Many thanks, Christopher, that is very clear. My incomplete neophyte understanding of the data constructs involved meant I would never have seen that. I shall give this a go first thing.

Cheers!

POSTED BY: Andrew Lewis

Dataset is new to me as well. I was a little surprised that DateListPlot was happy to ingest Dataset of GroupBy. My back up plan was to GatherBy the country.

b = {#[[All, 2 ;; -1]], #[[1, 1]]} & /@ GatherBy[Normal[Values[a]], First]

res1

This new structure { timeseries, legend} can be used two ways, PlotLegends option method:

DateListPlot[#1, PlotLegends -> #2] & @@ Transpose[b]

res2

Or the Legended method:

DateListPlot[Legended @@@ b]

res3

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard