How can I create a date diagram like that?
Let's say that the counting is done each couple of days, and the right bar represents the counting totals.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityHow can I create a date diagram like that?
Let's say that the counting is done each couple of days, and the right bar represents the counting totals.
If you don't mind a few differences here and there, the biggest bang for the buck is ArrayPlot
/MatrixPlot
Suppose you have you data in a nested list, gathered by month
ts[[1,1]] == (* jan/01 *)
ts[[2,20]] == (* feb/20 *)
(* and so on *)
You can plot them directly
MatrixPlot[ts,
ColorFunctionScaling -> False,
ColorFunction -> ColorData[{"PlumColors", {0, 800}}],
PlotLegends -> Automatic,
FrameTicks -> {Thread@{Range[12], monthNames}, Range[2, 31, 2]},
AspectRatio -> 1,
Epilog -> {Red, Thick, Line[{{0, 12 - 3}, {31, 12 - 3}}]}]
If you spend some time with the options (Mesh
, FrameTicks
, ColorFunction
) you might get a better approximation!
Mesh -> All
)
$\endgroup$
– Szabolcs
Mar 1 '16 at 15:12
Mesh
issue is why a chose a palette with Black
as the zero color, since White
is taken as "Null". It's not exactly the same, but I hope it's somehow useful!
$\endgroup$
– Aisamu
Mar 1 '16 at 15:16
ColorData["TemperatureMap"]
has White
as the middle color, and ColorData["VisibleSpectrum"]
does not work with the custom range option (a bug, perhaps).
$\endgroup$
– Aisamu
Mar 1 '16 at 18:10
Rectangle
. What is the input data you would use to make the plot and what have you tried so far? It is not difficult but it takes a bit of work, so it would be great if you could clarify where you got stuck and ask for more specific help ... $\endgroup$ – Szabolcs Mar 1 '16 at 14:12