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


Groups > comp.soft-sys.math.mathematica > #7169 > unrolled thread

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

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-12-13 10:45 +0000
Last post2011-12-13 10:45 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: ListLinePlot starting at x=0 rather than x=1 DrMajorBob <btreat1@austin.rr.com> - 2011-12-13 10:45 +0000

#7169 — Re: ListLinePlot starting at x=0 rather than x=1

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-12-13 10:45 +0000
SubjectRe: ListLinePlot starting at x=0 rather than x=1
Message-ID<jc7ac4$os2$1@smc.vnet.net>
n = 25;
randomWalk :=
  Transpose@{Range[0, n - 1], #} &@Accumulate[RandomReal[{-1, 1}, n]]
ListLinePlot[Table[randomWalk, {3}]]

or

Clear[randomWalk]
randomWalk[n_] :=
  Transpose@{Range[0, n - 1], #} &@Accumulate[RandomReal[{-1, 1}, n]]
ListLinePlot[Table[randomWalk[25], {3}]]

or

Clear[randomWalk]
randomWalk[n_] :=
  Transpose@{Range[0, n - 1], #} &@Accumulate[RandomReal[{-1, 1}, n]]
ListLinePlot[Array[randomWalk, 3, 24]]

Bobby

On Mon, 12 Dec 2011 05:45:17 -0600, 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
>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web