MathGroup Archive 2012

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

Search the Archive

Re: plotting histograms with do loop


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

or

graphs = Table[
   Histogram[RandomReal[NormalDistribution[0, i], 500]], {i, 1, 5}]

or

Row@graphs

or

Column@graphs

Bobby

On Mon, 16 Jan 2012 16:13:18 -0600, 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
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Re: How to simplify this code with variable number of nesting loops?
  • Next by Date: Re: plotting histograms with do loop
  • Previous by thread: Re: plotting histograms with do loop
  • Next by thread: Re: plotting histograms with do loop