Message Boards Message Boards

GROUPS:

Changing color of DateListPlot of time series based on another time series

Posted 15 days ago
153 Views
|
2 Replies
|
1 Total Likes
|

I'd like to find a way to use a coloring function for the plot of my time series based on another time series (on the same time frame).

For example:

BTC = FinancialData["BTC/USD", {{2013, 1, 1}, {2013, 1, 31}, "Day"}]
wd = WeatherData["Chicago", 
  "Temperature", {{2013, 1, 1}, {2013, 1, 31}, "Day"}]

Are two different time series on the same period and the same sampling time. I may want to plot the first one using a color function of the second one. Like:

DateListPlot[BTC, ColorFunction -> "TemperatureMap"]

But with "TemperatureMap" based on wd. Is that possible?

2 Replies
Posted 15 days ago

Thank you Eric, I ended up doing something similar but your code is really more versatile so I'll probably switch to your implementation for my application. Not knowing about interpolating functions I had to build one from scratch.

Also, nice trick getting the values passed to color function, I had to just "guess" :). Thanks again!

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

Group Abstract Group Abstract