I Get Paid For Doing This

So this is what’s been keeping me busy the last few days:

And here’s the code to do it yourself in your copy of Mathematica!

data = FinancialData["AAPL", {2012, 1, 1}];
mdata = {{{2012, 4, 16},
"WolframAlpha 1.2 Released, Awarded Nobel Prize for Wow"},
{{2012, 2, 4},
"Financial App Sale Begins Yeah Boyeeee this is a very long
annotation, let's see how it looks."}};
fdata = Table[{
mdata[[i, 1]],
Directive[Thick, Red, Dashed]
}, {i, 1, Length[mdata]}] ;
sdata = Sort[mdata];
Column[{DateListPlot[data, GridLines -> {fdata, None}, Joined -> True,
ImageSize -> Scaled[.75]],
Panel[Style[TableForm[Table[
{DateString[sdata[[i, 1]], "Date"],
Pane[mdata [[i, 2]], 300]}
, {i, 1, Length[sdata]}], TableAlignments -> Top], Small]]
}]

It doesn’t look like much, I know, but it has taken me a lot of tries and some help to get to this point.

(If you’re looking for corporate secrets here, you’re out of luck. It’s all dummy data. The graph is of Apple’s stock prices, the dates are random, and the annotations are made up.)

This entry was posted in Misc and tagged , . Bookmark the permalink.

Comments are closed.