Tag Info

New answers tagged

2

DateListPlot can be used with datasets with different timestamps: data1 = {{{2014, 10, 1}, 10}, {{2014, 10, 15}, 12}, {{2014, 10, 30}, 15}, {{2014, 12, 30}, 10}}; data2 = {{{2014, 9, 5}, 15}, {{2014, 9, 20}, 8}, {{2014, 11, 10}, 5}, {{2014, 12, 15}, 8}}; DateListPlot[{data1, data2}, Joined -> True, PlotMarkers -> {Automatic, 14}, ImageSize -> 400] ...


1

I think CalendarConvert, which is new in version 10 might help: CalendarConvert[ DateObject[{20134, 10, 16, 14, 10, 4}, TimeZone -> 0], "Julian"]


8

One way would be to specify an explicit x-axis range on the plots, using AbsoluteTime to convert the desired date range into the coordinate values required by PlotRange: $data1 = FinancialData["AAPL", {{2003, 9}, {2003, 11}}]; $data2 = FinancialData["MSFT", {{2003, 10}, {2004, 1}}]; $start = {2003, 8, 6, 0, 1, 29}; $end = {2004, 1, 24, 23, 46, 58}; ...


1

Here's a method inspired by Rojo's that uses VectorAngle to select corner points, based on their angle with adjoining points along the boundary. This avoids the traveling salesman. Generalizing to any month: days = <|Sunday -> 1, Monday -> 2, Tuesday -> 3, Wednesday -> 4, Thursday -> 5, Friday -> 6, Saturday -> 7|>; . ...


2

Perhaps instead of building the rectangles you can build lines, and only keep the vertices that appear an odd number of times? Such as sort = #[[Last@FindShortestTour[#, DistanceFunction -> ManhattanDistance]]] & october2014[Values, {# - {1, 1}, #, # - {0, 1}, # - {1, 0}} &][ Apply[Join] /* Counts /* Select[OddQ] /* Keys /* sort /* Line /* ...


1

Some really great answers. Mine is not as flashy but it took me a few hours to get it so I'm throwing it up nevertheless. I focused on making one month with the hope that I could make a month function and find a way to merge months together for a longer calendar (haven't gotten that far, yet). I've also gone the route of creating an item function for ...


7

ClearAll[mpbmdcg,ljr]; mpbmdcg[k_]:= Composition[MeshPrimitives[#,k]&, BoundaryMesh, DiscretizeGraphics, Graphics]; ljr = Composition[Line, Join[#, {#[[1]]}]&, Replace[#,Line[{a_,b_}]:>a, {0, Infinity}]&]; poly = First@mpbmdcg[2]@(Rectangle/@(-1+Normal[october2014[Values]])); fastdesc= FullSimplify[ Reduce[ ...


4

This is your codes. days = <|DayRange[DateObject[{2014, 10, 5}], DateObject[{2014, 10, 11}]] // Map[DayName] // MapIndexed[#1 -> First[#2] &]|>; october2014 = <| DayRange[DateObject[{2014, 10, 1}], DateObject[{2014, 10, 31}]] // MapIndexed[#1 -> {days[DayName[#1]], -1 - Quotient[-days[DayName[#1]] + ...



Top 50 recent answers are included