Specifying linewidth and line color via multi segment files

Dear All,

In the past I used multisegment files to plot drainage networks and controlled linewidth and line color by the header record (see below).

-W0.625401p -Z0.017751
26.500000 1.500000
26.500000 0.500000
-W0.327830p -Z0.094400
64.500000 1.500000
64.500000 0.500000

I used the following command:
cat CHI_River.network | psxy -R0/1024/0/512 -JX10/5 -CCHI.cpt -Bxaf -Byaf > test.ps
Until version psxy [core] 6.1.0_dde3912_2019.07.11 I got the following resulting figure.

However, after updating to the most recent version (gmt psxy [core] 6.2.0 [64-bit] ) and using the same data and command line, I can either specify the line width or the line color.

I’m sure that the problem is the command line /header of the multi-segment file and assume that the older GMT version was probably more generous.

I would be very happy if somebody could show me a solution, which is working with gmt 6.2.

Thanks
Jörg

Probably need to add -W+cl to the command line I think.

Dear Paul,
Sorry I forgot to mention that I’ve already tried -W+cl. While the lines are then nicly color-coded according to -Z, the line width becomes uniform. Actually I can have varible line width or variable colors but I can not define both via > -Z -W
Any ideas?
-J

From gmt plot -?:
To use for an outline pen, select -W+z.
Then I tried:
gmt makecpt -Crainbow -T1e-2/1e-1/1e-2 > test.cpt
gmt begin test png
gmt basemap -R26/28/0/2 -Jx5c -Ba0.5
gmt plot -Ctest.cpt << EOF
> -W2p+z -Z0.017751
26.500000 1.500000
26.500000 0.500000
> -W4p+z -Z0.094400
27.500000 1.500000
27.500000 0.500000
EOF
gmt end

Using gmt 6.0.0, I get:

But with 6.1.0 and 6.2.0, it says:
plot [WARNING]: Length z not supported - revert to default unit [point]
plot [WARNING]: 2p+ not a valid number and may not be decoded properly.
plot [WARNING]: Length z not supported - revert to default unit [point]
plot [WARNING]: 4p+ not a valid number and may not be decoded properly.

Could be a bug?

The -W+z refers to the -Z command line option of passing data. Problem here was a bug, fixed today in master.

Dear Paul, Marcelo,
GREAT! - I have just build the lastest version of GMT and everything works perfect!
Thanks
Jörg