7. Graphik
==========
(siehe "An Introduction to R", Sec 12)
	data(mtcars)

	summary(mtcars)
	summary(mtcars$mpg)
	attach(mtcars)
	summay(mpg)

	hist( mpg)

	hist( mpg, prob=T)
	lines( density( mpg))    ## density ist im Grunde auch ein relatives Histogramm, aber feiner
	rug(mpg)

	boxplot(mpg)
	boxplot(mpg,cyl)
	boxplot(mtcars)

	plot( mpg)

	qqplot ( mpg, hp)

    Parameter

	par("col")

	oldcol <- par("col")
	par( "col" = "green")
	plot( mpg)
	par( "col" = oldcol)
	plot( mpg)
	plot( mpg, type = "l")
	plot( colnames(mtcars) mpg, axes = FALSE, ylab = "miles/gallon")

	hist( mpg, prob=T)
	lines( density( mpg), "col" = "green")    
        rug(mpg, "col" = "blue")

    mehrere Plots auf einer Seite 

	par(mfrow=c(2,1))
	boxplot(mpg)
	boxplot(cyl)

    Graphiken in Dateien

	pdf( "ausgabe.pdf")
	hist( mpg, prob=T)
        lines( density( mpg), "col" = "green")
        rug(mpg, "col" = "blue")
	dev.off()

     es gibt auch interaktive Graphik, 3D-Graphik


8. Verteilungen
===============

	par(mfrow=c(2, 1),oma=c(0,0,1,0))

	x <- seq(-10,10,0.01)

	plot(x,dnorm(x,mean=0,sd=1),type="l", ylab="N(x|0,1)" )
	plot(x,dnorm(x,mean=4,sd=3),type="l", ylab="N(x|0,3)" )

	mtext("normal distribution", outer=TRUE)
	
	par(mfrow=c(1, 1))
	x <- rnorm(100)
	qqnorm(x)
	x <- rnorm(1000)
	qqnorm(x)



(siehe "An Introduction to R", Sec 8)
