@@ -82,7 +82,11 @@ Mathematica is (C) Copyright 1988-2015 Wolfram Research, Inc.
82
82
There are several options that would be nice to be added.
83
83
1. Font size of the ticks, coloring, line thickness, etc.
84
84
2. I am not sure is possible and how to retrieve commits that a password protected.
85
- 3. Hyperlinks to the commits.
85
+ 3. DONE -- Hyperlinks to the commits.
86
+ 4. Error handling.
87
+ 5. Refactor the code so the git data be retrieved separately from the plotting.
88
+ This is needed for experimentation with the plots because GitHub will reject requests
89
+ after they become too many (for GitHub).
86
90
87
91
88
92
There are probably bugs in the code. I have tested it with only 4-5 repositories.
@@ -204,14 +208,14 @@ Mathematica is (C) Copyright 1988-2015 Wolfram Research, Inc.
204
208
(* DateListPlot based *)
205
209
(* It would be nice to be able to specify the commits point sizes and line thickness of the dependencies. *)
206
210
GitHubDateListPlot [ user_ String , repo_ String , opts :OptionsPattern [] ] :=
207
- Block [{commitRecs , pathsByInds , datePoints , tickLabels , gr },
211
+ Block [{commitRecs , pathsByInds , datePoints , tickLabels , gr , pointSize = 0.03 },
208
212
209
213
{commitRecs , pathsByInds , datePoints , tickLabels } = CorePlotData [user ,repo ];
210
214
211
215
gr = DateListPlot [
212
216
MapThread [Tooltip [#1 , #2 ] & , {datePoints , tickLabels }],
213
217
opts ,
214
- Joined -> False , PlotStyle -> {PointSize [0.03 ]},
218
+ Joined -> False , PlotStyle -> {PointSize [pointSize ]},
215
219
PlotRange -> All , AspectRatio -> 2 , ImageSize -> {Automatic , 800 },
216
220
GridLines -> {None , Automatic },
217
221
FrameTicks -> {{Automatic ,
@@ -220,10 +224,13 @@ Mathematica is (C) Copyright 1988-2015 Wolfram Research, Inc.
220
224
221
225
Show [gr ,
222
226
Graphics [{Opacity [0.5 ], Thickness [0.01 ],
223
- MapThread [{ColorData ["TemperatureMap" ][#2 ],
224
- Line [datePoints [[#1 ]]]} & , {pathsByInds ,
225
- RandomSample [Range [0 , 1 , 1 / (Length [pathsByInds ] - 1 )]]}],
226
- Opacity [1 ], LightBlue , PointSize [0.02 ],
227
+ MapThread [{
228
+ ColorData ["TemperatureMap" ][#2 ],
229
+ Mouseover [
230
+ Line [datePoints [[#1 ]]], {Red , PointSize [pointSize * 1.18 ], Point [datePoints [[#1 ]]]}]
231
+ } & ,
232
+ {pathsByInds , RandomSample [Range [0 , 1 , 1 / (Length [pathsByInds ] - 1 )]]}],
233
+ Opacity [1 ], LightBlue , PointSize [pointSize * 0.66 ],
227
234
MapThread [
228
235
Tooltip [
229
236
Point [#1 ],
0 commit comments