Plotting of vector fields
Gz = gmt("grdmath -R-2/2/-2/2 -I0.1 X Y R2 NEG EXP X MUL =");
Gdzdx = gmt("grdmath ? DDX", Gz);
Gdzdy = gmt("grdmath ? DDY", Gz);
grdcontour(Gdzdx, figsize=8, axis=(annot=1, axes=:WSne), cont=0.1, annot=0.5,
labels=(dist=5,), smooth=4, ticks=(gap=(0.25,0.08),))
grdcontour!(Gdzdy, axis=:same, cont=0.05, annot=0.2, labels=(dist=5,),
smooth=4, ticks=(gap=(0.25,0.08),), x_off="a9")
grdcontour!(Gz, axis=:same, cont=0.05, annot=0.1, labels=(dist=5,),
smooth=4, ticks=(gap=(0.25,0.08),), y_off=9)
grdcontour!(Gz, axis=:same, cont=0.05, labels=(dist=5,), smooth=4, x_off=9)
grdvector!(Gdzdx, Gdzdy, inc=0.2, arrow=(len=0.25, shape=0.25, stop=true,
norm=0.6), fill=:black, pen=1, vec_scale=13)
T = text_record([8 10], "z(x,y) = x@~\\327@~exp(-x@+2@+-y@+2@+)");
text!(T, limits=(0,15,0,12), proj=:linear, figscale=1, font=(40,"Times-Italic"),
anchor=:CB, x_off=-9, show=true)
See also GMT ex13