Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7174

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

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: ListLinePlot starting at x=0 rather than x=1
Date 2011-12-13 10:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jc7ai1$ou4$1@smc.vnet.net> (permalink)
References <201112121145.GAA12913@smc.vnet.net>

Show all headers | View raw


data = Table[Accumulate[RandomReal[{-1, 1}, 25]], {3}];

ListLinePlot[data]

shift[x_List] := Thread[{Range[0, Length[x] - 1], x}]

ListLinePlot[shift /@ data]


Bob Hanlon

On Mon, Dec 12, 2011 at 6:45 AM, pedro silva <pedro_silva58@hotmail.com> 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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: ListLinePlot starting at x=0 rather than x=1 Bob Hanlon <hanlonr357@gmail.com> - 2011-12-13 10:48 +0000

csiph-web