MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Graph by Date

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93268] Re: Graph by Date
  • From: appris at att.net
  • Date: Sat, 1 Nov 2008 05:13:02 -0500 (EST)
  • References: <geee9v$ack$1@smc.vnet.net>

I believe that the date format needs to be in quotes;  so your data
will have to look as the following:

mydata = {{"1/5/2004", "widgetA", 55.2}, {"1/15/2004", "widgetD32",
   5.2}, {"2/7/2004", "no_Widgets", 34.5}, {"5/6/2004", "widget62",
   100.2}, {"5/16/2004", "widget6", 30.5}, {"9/13/2004", "widget 55t",
    225.79}}

Then you can use the following command to only take the date and the
value:

cs = Drop[mydata[[Range[Length[mydata]], {1, 3}]]]

You can then use your plotting routine - I changed the PlotRange for
the Y-axis so that you can see the filling from 0 to the value of
interest.

DateListPlot[cs, Filling -> Bottom, FillingStyle -> Blue,
 PlotStyle -> {Red, PointSize[Large]},
 PlotRange -> {{{2004, 1}, {2004, 12}}, {0, 250}},
 DateTicksFormat -> {"Month", "/", "YearShort"}]

I am sure there is a simpler and more efficient manner to accomplish
the same task - I hope this does the job for now.

Good Luck.


  • Prev by Date: Re: newbie question
  • Next by Date: Re: best book to quickly master all Mathematica functions, and commands
  • Previous by thread: Re: Graph by Date
  • Next by thread: Re: Graph by Date