########################################
# Rozdeleni extremnich hodnot
########################################
library(evd)
curve(dgumbel,-10,10,col=1,ylab="g0(x)",main="Gumbel distribution")
abline(v=0)

ind=c(-5,-1,3,7)
col=2:5
for (i in col){
curve(dgumbel(x,loc=ind[i-1]),-10,10,col=i,add=T)}
legend("topleft",legend=c(0,ind),col=c(1,col),lty=1,lwd=2,title=expression(mu))


curve(dgumbel,-10,10,col=1,ylab="g0(x)",main="Gumbel distribution")
ind=c(2,3,5,10)
col=2:5
for (i in col){
curve(dgumbel(x,scale=ind[i-1]),-10,10,col=i,add=T)}
legend("topright",legend=c(1,ind),col=c(1,col),lty=1,lwd=2,title=expression(sigma))
abline(v=0)

curve(dfrechet(x,shape=10),0,5,col=10,ylab="g1(x)",main="Frechet distribution")
ind=c(1,3,5,8)
for (i in ind){
curve(dfrechet(x,shape=i),0,5,col=i,add=T)}
legend("topright",legend=c(ind,10),col=c(ind,10),lty=1,lwd=2,title=expression(alpha))


curve(drweibull(x,shape=5),-5,0,col=5,ylab="g2(x)",main="Weibull distribution")
ind=c(1,2,3,4)
for (i in ind){
curve(drweibull(x,shape=i),-5,0,col=i,add=T)}
legend("topleft",legend=c(-ind,-5),col=c(ind,5),lty=1,lwd=2,title=expression(alpha))


curve(dgev(x,shape=0),-7,7,col=1,ylim=c(0,1),ylab="g(x)",main="GEV distribution")
ind=c(-1,-0.5,0.5,1)
col=2:5
for (i in col){
curve(dgev(x,shape=ind[i-1]),-7,7,col=i,add=T)}
abline(v=0)
legend("topright",legend=c(0,ind),col=c(1,col),lty=1,lwd=2,title=expression(gamma))




















