Created
October 1, 2014 10:14
-
-
Save trialsolution/8d3de0b590036c98fb2b to your computer and use it in GitHub Desktop.
CES indifference curves with different elasticities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# GNUPLOT script to draw CES functions with different parameters | |
# | |
# script based on the implicit function plotting trick from: | |
# http://gnuplot-surprising.blogspot.de/2011/09/assume-three-is-equation-fxygxy-and-we.html | |
# uncomment in case you want to save it to a file | |
#set term png enhanced lw 2 font "Times,18" | |
#set output "ces_elas.png" | |
set contour | |
set cntrparam levels discrete 1 | |
set view map | |
unset surface | |
set title "Implicit plot of CES functions (different subst. elasticities)" | |
set xrange [0:10] | |
set yrange [0:10] | |
sigma_1 = 2 | |
rho_1 = 0.5 | |
f(x,y)=0.25*(0.5*x**rho_1 + 0.5*y**rho_1)**(1/rho_1) | |
sigma_2 = 4 | |
rho_2 = 0.75 | |
g(x,y)=0.25*(0.5*x**rho_2 + 0.5*y**rho_2)**(1/rho_2) | |
sigma_3 = 1 | |
rho_3 = 1 # linear function | |
h(x,y)=0.25*(0.5*x**rho_3 + 0.5*y**rho_3)**(1/rho_3) | |
sigma_4 = 10 | |
rho_4 = 0.9 | |
i(x,y)=0.25*(0.5*x**rho_4 + 0.5*y**rho_4)**(1/rho_4) | |
splot f(x,y),g(x,y),h(x,y),i(x,y) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment