Page 1 of 1

Displaying several graphs in one graph!

Posted: Thu Jan 01, 2009 10:14 am
by Rocketeer
Hi!

I'm trying to plot a histogram of a series called dly with daily data from a stock index.
Within the same plot I also want to have the normal distribution superimposed. I
don't know how to do this. I have tried the following code below but its not exactly
what I want.

dly.stats
dly.hist

series z = nrnd
freeze(graphEmpNorm) dly.cdfplot(c)
graphEmpNorm.addtext(b) Empirical Cumulative Distribution Function
freeze(graphTheorNorm) z.cdfplot(c)
graphTheorNorm.addtext(b) Gaussian Cumulative Distribution Function
show graphEmpNorm graphTheorNorm

Does anyone know how to plot a histogram of a series with the bell shaped normal
distribution superimposed?

Thanks!

Re: Displaying several graphs in one graph!

Posted: Thu Jan 01, 2009 12:15 pm
by EViews Gareth
You need to use a distribution plot:

freeze(graphEmpNorm) dly.distplot hist theory


That should do it.

Re: Displaying several graphs in one graph!

Posted: Thu Jan 01, 2009 3:59 pm
by Rocketeer
Hi! Thanks for your answer.

An error message says that distplot is not a valid view for dly.
I don't find distplot in the Command and Programming reference.
Maybe I should have posted in the EViews5 section. I use EViews
5.0. I'm sorry I didn't see this before posting my first message.