MathGroup Archive 2007

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

Search the Archive

Re: graphing with dates and values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73100] Re: graphing with dates and values
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Sat, 3 Feb 2007 04:08:05 -0500 (EST)
  • References: <epv3it$96f$1@smc.vnet.net>

On Feb 2, 12:25 pm, "fredfur" <mrmillh... at yahoo.co.uk> wrote:
> Hi  I have a list:
>
> {21-Mar-86, 27.5}, {20-Mar-86, 28.25}, {19-Mar-86, 28.75}, {18-Mar-86,
> 29.5} etc.
>
> how do I graph this with the dates on the x axis and the values on the
> y axis?
>
> thanks

Since you don't give us the complete list of your data I create one of
my own (everything is converted to InputForm)

lst = ({StringJoin[ToString[#1], "-Mar-86"], Random[Real, {20, 30}]}
& ) /@ Range[30]

{{"1-Mar-86", 23.613774549499446}, {"2-Mar-86", 24.755358595206026},
{"3-Mar-86", 25.78472618921232},
  {"4-Mar-86", 24.015010183499367}, {"5-Mar-86", 21.870640478512268},
{"6-Mar-86", 24.84882385269968},
  {"7-Mar-86", 26.0558860328317}, {"8-Mar-86", 23.73798568318062}, {"9-
Mar-86", 28.889904184642614},
  {"10-Mar-86", 24.489023742622766}, {"11-Mar-86", 27.76230197769936},
{"12-Mar-86", 24.7579400761661},
  {"13-Mar-86", 23.288920649503776}, {"14-Mar-86", 25.0449971147684},
{"15-Mar-86", 24.059727034350452},
  {"16-Mar-86", 28.55529742653144}, {"17-Mar-86", 20.52248945492899},
{"18-Mar-86", 20.52245213178437},
  {"19-Mar-86", 21.453040520574078}, {"20-Mar-86", 22.24958549625941},
{"21-Mar-86", 22.957782039316143},
  {"22-Mar-86", 27.344002806162326}, {"23-Mar-86", 26.19686646795488},
{"24-Mar-86", 21.39366477811889},
  {"25-Mar-86", 29.344007489816697}, {"26-Mar-86",
22.588644210956303}, {"27-Mar-86", 20.41214027874256},
  {"28-Mar-86", 27.378654594619523}, {"29-Mar-86",
27.473367011304425}, {"30-Mar-86", 27.739820358256623}}

Now amog other things you can try

ListPlot[Transpose[lstdays][[2]], PlotStyle -> PointSize[0.02], Frame -
> {True, True, False, False}, Axes -> False,
   PlotLabel -> "March 1986", ImageSize -> 500, TextStyle -> {FontSize
-> 14}, FrameLabel -> {"day", "value"}];
(*plot to be displayed*)

Contact again to this forum for modify the "look" of the graph for
your specific needs!

Best Regards,

Dimitris


  • Prev by Date: Re: reverse polish notation
  • Next by Date: Re: simple trigonometric expression
  • Previous by thread: Re: Problem with new Mathematica Installation on Linux
  • Next by thread: Re: graphing with dates and values