Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Reducing the width of an arrow

In the following code I can increase the width of the arrows but not decrease it. How can I do they are obviously to great

f(x,y) = x^.5*y^.5
# Contours from z1 to z2. 
# This interval is divided into ni subintervals
z1, z2 = 0, 2
ni = 20
dz = (z2-z1)/ni
levels = [z1,z1+dz..z2]
pl = contour_plot(f(x,y), (x,0,2), (y,0,2), contours=levels, 
                      cmap="gist_yarg", colorbar=false,frame=false,axes=false)
pl += arrow((0,0), (2.1,0),color='black')
pl += arrow((0,0), (0,2.1),color='black')
pl += contour_plot(f, (0,2), (0,2), contours=levels, fill=False)
pl += arrow((0,0), (0,2.1),color='black',width=1,arrowsize=.5) #<- here
pl += text(r'$\overline{U}$', (2.1,0.95),color='red')
pl += text(r'$\overline{\overline{U}}$', (2.1,1.1),color='red')
pl += text(r'''$\mathrm{Courbes\,\, d'indifférence}$''', (1,2.3),color='red')
pl += text(r'''$\mathrm{Fonction\,\, de \,\,Cobb-Douglas\,\, : \,\,} U(x,y) = x^{1/2} y^{1/2}$''', (1,2.2),color='red')
show(pl,axes_labels=['$x$', '$y$'],ticks=[None, None],frame=false)

Thanks