# Plot markers for monthly data

I have the following data

    hours={38.9, 39, 38.9, 39, 39.3, 39.7, 39.2, 38.8, 39.6, 39.8, 39.9, 40.3, \
40, 40.2, 40.8, 40.7, 40.8, 41.2, 40.6, 40.7, 40.7, 40.9, 40.6, 40.8, \
40.3, 40.4, 40.7, 40.5, 40.7, 41.2, 40.3, 39.7, 40.4, 40.1, 40.3, \
40.6, 40.1, 40.5, 40.8, 40.8, 40.9, 41.7}


The first entry belongs to January of year 1, the second to February of year 1, and so on.

If I plot this with ListPlot[hours, PlotMarkers -> {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}]

I don't get the desired result, which is to have the right number corresponding to the right month...

Any help would be appreciated.

It's because the different elements of your PlotMarkers option refer to different data sets, whereas you just have the one data set.

If you were only after different coloured data points then you could Style each element of your data set, however I don't know if its possible to do this with different symbols.

A kind of hacky solution is just to convert your data set into many set each with one data point, as follows:

    ListPlot[List /@ Transpose[{Range[Length[hours]], hours}],
PlotMarkers -> ToString /@ Range[Length[hours]]]


EDIT

After re-reading your question I gather you simply want the markers 1-12 repeated, in which case use something like:

    PlotMarkers->PadRight[{}, Length[hours],
Table[Style[ToString[i], ColorData["Rainbow"][(i - 1)/11]], {i, 12}]]


• Many thanks Quantum – An old man in the sea. Feb 9 '16 at 18:28
• What should I do if I wanted to begin at number 6, and still maintain the same period of 12? – An old man in the sea. Feb 9 '16 at 19:25
• Many ways to get there, using Mod seems sensible to me, change ToString[i] to ToString[Mod[i + 4, 12] + 1]. – Quantum_Oli Feb 9 '16 at 19:28
• Thanks. I was going to say the exact same thing. I've just managed to do it. ;) – An old man in the sea. Feb 9 '16 at 19:30
ListPlot[MapThread[
Labeled[#1, Style[#2, Bold, 12]] &, {hours,