MathGroup Archive 2011

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

Search the Archive

Re: ListLinePlot starting at x=0 rather than x=1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123615] Re: ListLinePlot starting at x=0 rather than x=1
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Tue, 13 Dec 2011 05:41:24 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jc4pt0$cnj$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 12/12/2011 5:52 AM, pedro silva wrote:
> greetings from a newbie!
> i'm trying to plot a bunch of numbers against n {0,1,2...}, something along the lines of (from the help)
> ListLinePlot[Table[Accumulate[RandomReal[{-1, 1}, 25]], {3}]]
> , but i need the lines to start at x=0, rather than 1.  i expect this to be simple, but i can't find a way to do it.  any help would be appreciated!
>
> cheers,
> pedro
>


May be use DataRange?

---------------------

nItems = 25;
data   = Table[Accumulate[RandomReal[{-1, 1}, nItems]], {3}];
ListLinePlot[data, DataRange -> {0, nItems - 1}]

---------------------

--Nasser



  • Prev by Date: Re: ListLinePlot starting at x=0 rather than x=1
  • Next by Date: Re: ListLinePlot starting at x=0 rather than x=1
  • Previous by thread: Re: ListLinePlot starting at x=0 rather than x=1
  • Next by thread: Re: ListLinePlot starting at x=0 rather than x=1