Wiggle -G option does not work

Hi There,
I was trying to use the command wiggle in modern mode to plot wiggles with the positive parts filled with red and the negative parts with blue. However, neither part is filled in the resulting figure. Is it possible for you to look into this? I am attaching my script, the input files, and the output figure below. ThanksWiggleProblem.zip|attachment (12.2 KB)

In case the attached ZIP file cannot be downloaded, here is my script:

dir_txt_prf=/Users/til008/Research/WorkingDirectory/USArray_PRF/GMT/TXTFile/Synthetic
dir_txt_srf=/Users/til008/Research/WorkingDirectory/USArray_SRF/GMT/TXTFile/Synthetic
dir_pdf=…/PDFFile

mod=$dir_txt_prf/IASP91_LVL70to100.mod
wig_prf=$dir_txt_prf/IASP91_LVL70to100_r_dep.wig
wig_srf=$dir_txt_srf/IASP91_LVL70to100_z_dep.wig

lw_vp=2p,blue
lw_vs=2p,red
lw_rho=2p,green
lw_wig=2p,black

J_vel=X3i/-5i
J_rho=X1.5i/-5i
J_prf=X1.5i/-5i
J_srf=X1.5i/-5i

R_vel=3/8.3/0/120
R_rho=2.5/3.5/0/120
R_prf=-0.5/0.5/0/120
R_srf=-0.5/0.5/0/120

gmt begin ThreeMethodDepthTrace pdf D$dir_pdf
gmt set MAP_FRAME_TYPE plain
gmt set COLOR_NAN 128/128/128
gmt set FONT_LABEL 12p,Helvetica,black

gmt subplot begin 1x5 -Fs3i,1.5i,1.5i,1.5i,1.5i/5i
gmt subplot set 0,0
gmt plot $mod -J${J_vel} -R${R_vel} -BWeNs -Bxa1f0.5+l"Velocity (km/s)" -Bya50f10+l"Depth (km)" -W${lw_vp} -i1,0 -Vl
gmt plot $mod -J${J_vel} -R${R_vel} -W${lw_vs} -i2,0 -Vl

gmt subplot set 0,1
gmt plot $mod -J${J_rho} -R${R_rho} -BweNs -Bxa0.2f0.1+l"Density (g/cm@+3@+)" -Bya50f10 -W${lw_rho} -i3,0 -Vl

gmt subplot set 0,2
gmt wiggle $wig_prf -J${J_prf} -R${R_prf} -BweNs -Bxa0.5f0.1+l"Amplitude" -Z3i -Bya50f10 -W${lw_wig} -Gred+p -Gblue+n -i2,0,1 -Vd

gmt subplot set 0,3
gmt wiggle $wig_srf -J${J_prf} -R${R_prf} -BweNs -Bxa0.5f0.1+l"Amplitude" -Z3i -Bya50f10 -W${lw_wig} -Gred+p -Gblue+n -i2,0,1 -Vd

gmt subplot end
gmt end

@tianzeliu Your script is not run-able. No data attached. Please, reduce it to a single plot that shows your issue. Avoid variables and other OS specific things. Remember that not all are on unix.

I am sorry. Here is the ZIP file with the script reduced to the minimum and the input data included. Thanks!
WiggleProblem.zip (6.7 KB)

I can reproduce your plots but this is a user error. You are preparing the wrong input for wiggle. When we wrote wiggle back during the 15th century we were looking at plotting things like magnetic anomalies along ship tracks in a map. So the x,y for us was longitude, latitude of the ship track, and z is the anomaly. In your case, you were passing in the wiggle itself as the track and gave z = 0. So with no anomaly there is nothing to plot. If you instead use -i1,0,2 then you will find that your “x” is all zero (the center gridline, y is your y-coordinate, and z now has the amplitude. Voila, a plot.

Oh, yes, you are right. Thanks!

Tianze