Plot of vector line segments is not parsing segment headers

This may be a bug but since I cannot get it to work in version five either, I assume the error is mine.

I am trying to plot line segments and use -W in the segment header to change the pen for each segment.

Version 6 code:

gmt begin LineTestOut jpg

gmt plot -Vd <<EOF
# @VGMT1.0 @GLINESTRING @Nname|depth|id
# @Tstring|double|integer
# @R178.1/180.6/-48.7/-45.6
# @Jp"+proj=longlat +ellps=WGS84 +datum=WGS84+no_defs"
# FEATURE_DATA
> -Wred
# @D"Line 1"|-50|1
178.5 -45.7
178.6 -48.2
178.4 -48.7
178.1 -45.6
> -Wblue
# @D"Line 2"|-50|1
180.5 -45.7
180.6 -48.2
180.4 -48.7
180.1 -45.6
EOF

gmt end show

I expect one segment in red and the other blue. Instead both use the default pen, black.

This seems to indicate that it is possible.

https://docs.generic-mapping-tools.org/latest/plot.html#segment-header-parsing

My test segments are based on the line file example here:

https://docs.generic-mapping-tools.org/latest/cookbook/ogrgmt_format.html#examples

Any insights are appreciated :slight_smile: