Multi-segment header and closed polygons

Hi !

I generate a multi-segment file and the result looks like this (excerpt) :

> -L"POI" -Sc0.5 -Gblack
21.0 66.5 3

>   -Wthick,darkgray,-
-16.2 63.0 0
-16.0 61.6 0
-18.3 61.1 0

> 1020 -Wthin,black+s
-45.3 24.8 0
-42.3 24.1 0
-13.7 43.5 0
-11.9 45.6 0
-10.6 46.5 0
-08.8 49.3 0
-08.7 49.6 0
-05.8 52.4 0
-17.9 56.4 0
-20.6 55.7 0
-21.0 55.5 0
-24.0 54.1 0
-27.1 52.9 0
-51.4 28.1 0
-48.3 25.7 0
-46.9 25.2 0
-45.3 24.8 0

> 1030 -Wthin,black+s
-60.5 40.2 0
-57.5 39.9 0
-54.4 39.9 0
-53.3 40.4 0
-51.4 42.9 0
-50.6 43.5 0
...

Now, I try to plot 3 objects :

  • Points (> -L"POI" -Sc0.5 -Gblack)
  • Segments (> -Wthick,darkgray,-)
  • Polygons (> 1020 -Wthin,black+s)

The problem is that points are not begin plotted, segments are treated as closed polygons and closed polygons are filled (which I can suppress by adding -G- in the header).

Any idea ?

gmt begin test png
	gmt coast -R-120/120/-80/80 -JM20c -Bafg -Gantiquewhite -Slightblue -Wthinner,black -Di -A10000
	gmt plot tmp.txt
gmt end show

Hmm, what is the intent here? -L is Force closed polygons but you have only one point. Don’t know what -L"POI" do.

Better post a small example of that file.

GMT is very good but not designed to second guess your thoughts
simplify the process into three files and three steps

  1. plot the symbols
  2. plot the lines
  3. plot the polygons

Well sure gmt plot does not accept -S... option from the segment header.
Doing so would be a clear improvement.

I have never tried to mix points, lines, and polygons in a single GMT input file. I think it only works on one type of vector object at a time.

One can mix lines and filled polygons but we must undo previous options when those are not wished anymore. An option in a header remains active through next segments.

Hmm, we have this in the plot docs.

You can also change symbols by adding the required -S option to any of your multi-segment headers.

but not sure how to use it. And it also seems that once we set a -G in header all posterior segments will close the lines. At most what can be prevented is to fill it but not the closing.

Do I have any chance if I try github or I’d rather decompose the file in multiple object-specifics ones?

There is nothing new in this regard in the dev version (github) so probably the best is to break it into separate data files in one per geometry.