Universidade Federal da Paraíba
Curso de Graduação em Economia
Análise Microeconômica I
options(OutDec=",")
x <- y <- seq(0.4,10,length=100)
# Definir função: f(x,y)
f <- function(x1,x2) {(x1*x2)^0.5}
z <- outer(x, y, FUN="f")
yf <- function(x1,a) {(a/x1)^0.5 }
# Desenhar gráfico
par(oma=c(0,1.8,0,0.8))
persp(x, y, z, shade=0.2, d=2, theta=123,col=0,border = NA,ticktype="detailed",
xlab="L",ylab="K",zlab="Y=F(K,L)",phi=5, cex.axis=0.8,cex.lab=0.8, cex.main=0.9,) -> res
points(trans3d(x, yf(x,8), 2, pmat = res), col = 4,type="l", lwd=2,lty=1)
points(trans3d(x, yf(x,40), 4, pmat = res), col = 4,type="l", lwd=2,lty=2)
points(trans3d(x, yf(x,100), 8, pmat = res), col = 4,type="l", lwd=2,lty=3)
points(trans3d(x, yf(x,8), 0, pmat = res), col = 2,type="l", lwd=2,lty=1)
points(trans3d(x, yf(x,40), 0, pmat = res), col = 2,type="l", lwd=2,lty=2)
points(trans3d(x, yf(x,100), 0, pmat = res), col = 2,type="l", lwd=2,lty=3)
par(fig=c(0, 1, 0, 1), oma=c(0, 0, 0, 0),mar=c(0, 0, 0, 0), new=TRUE)
plot(0,axes=F,xlab="",ylab="",col="transparent")
legend("topright",c(expression(Y == 8),expression(Y == 40),expression(Y == 100)),
bty="n", lty =c(1,2,3),col=c(4,4,4),cex=0.9)