Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

The code below generates the plot above,

DateListPlot[{Drop[series[7], 1], Drop[series[16], 1]},Joined -> True, 
              PlotMarkers -> {Automatic, Small}, Frame -> True,
              DateTicksFormat -> {"MonthNameShort", " ", "YearShort"} ] /.
              x : (FrameTicks -> _) :> (x /. s_String :> Rotate[s, 90 Degree])

I would like to show, on the x-axis, each and every one of the dates for which I have data. If that gets too cluttered then I would like to show a sampling of it that covers some of the staggered months. I will paste this into a pdf so tooltips won't be of use. Maybe for within year data, I can mention just the month, if it will improve readability. With non-date data, I know that I can enter ticknames and tick positions but I don't know how to do it with date data and also, I was wondering if this could be automated where I could tell it to show only the month for certain dates and month-year for others.

share|improve this question
possible duplicate of Creating DotPlots – Artes Dec 26 '13 at 22:04
up vote 7 down vote accepted

Use the data as ticks.

data = WolframAlpha["brad pitt", 
         {{"PopularityPod:WikipediaStatsData", 1}, "TimeSeriesData"}];

rarify = data[[1 ;; -1 ;; 10]];

DateListPlot[rarify, FrameTicks -> {rarify[[All, 1]], Automatic}, 
  Filling -> Bottom, PlotMarkers -> {Automatic, Small}, Frame -> True,
   DateTicksFormat -> {"MonthNameShort", " ", "YearShort"}] /. 
 x : (FrameTicks -> _) :> (x /. s_String :> Rotate[s, 90 Degree])

enter image description here

share|improve this answer
Thanks! That works. Can you please tell me what you've done to select or sample from the large data that you had.. the [[1;;-1;;10]] command. – Amatya Dec 26 '13 at 20:46
@Amatya this means from 1st element (1) to last (-1) taking each 10th element. I did this so that ticks won't overlap and make a mess. Is this what you are asking about? – Vitaliy Kaurov Dec 26 '13 at 20:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.