MathGroup Archive 2012

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

Search the Archive

Re: plotting histograms with do loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124357] Re: plotting histograms with do loop
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Tue, 17 Jan 2012 03:32:51 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201201162213.RAA15471@smc.vnet.net>

>From the documentaton for Do:  "Unless an explicit Return is used, the
value returned by Do is Null. "

Use Table

Table[Histogram[RandomReal[NormalDistribution[0, i], 500],
   ImageSize -> 360], {i, 5}] // Column

Or Print within the Do

Do[Print[Histogram[RandomReal[NormalDistribution[0, i], 500]]], {i, 5}]


Bob Hanlon

On Mon, Jan 16, 2012 at 5:13 PM, hanciong awesome <hanciong at gmail.com> wrote:
> hello all, I want to plot several histograms with do-loop. It is
> histogram of normal distribution, all with mean zeros, and standard
> deviation successively increasing from 1 to 5. I do the following:
>
> Do[   Histogram[RandomReal[NormalDistribution[0, i], 500]],
>  {i, 1, 5}  ]
>
> But it doesn't give anything. could anyone help me? Thanx
>



--
Bob Hanlon



  • Prev by Date: Re: plotting histograms with do loop
  • Next by Date: Re: opposite of AppendTo
  • Previous by thread: Re: plotting histograms with do loop
  • Next by thread: Re: plotting histograms with do loop