+s for spline doesn't work?

Dear Gurus,

I’m trying to get some points connected by a spline. According to the CookBook 3.14 “Specifying line attributes” a simple +s when defining the pen should do the trick. For me it doesn’t. What am I doing wrong?

cat > path.txt << END
 1.3 -1.5
 0.2  0.4
-0.8  0.1
-1.8  1.2

gmt begin map
  gmt basemap -R-2/2/-2/2 -JM6i -Bafg1
  gmt plot path.txt -W2p,red+s
gmt end show

I’m using GMT 6.1.0_634a89a_2020.03.21

Thank you and all the best,

Apparently, that only works for Cartesian -JX projections. I will re-learn why and update the docs or allow it for geo.

@pwessel, thank you for having a look at this. Would be great to have it in geo.

Hi @pwessel, I experimented with bezier splines a bit more and I think I found the reason why you originally made it work only in -JX projections. You hinted that it is done in PostScript and not by GMT itself. I figured the math is done on the 2D surface of the plot and not (as I assumed) on the ellipsoid surface.

cat > path.txt << END
 30  -15
 30   45
-30   45
-30  -15

gmt begin earth_bezier_spline
  gmt basemap -Rg -JG30/50/15c -Bpg15d -Bsg30d --MAP_GRID_PEN_SECONDARY=1p,black
  gmt plot path.txt -W2p,green
  gmt plot path.txt -W2p,red+s -A
  gmt plot path.txt -Skcrosshair/0.5c -Wthinnest,black
gmt end show

I expected the western portion of the red bezier spline to be on the west (left) side of the green great circle line similar to the eastern (right) part. Maybe I just haven’t found the appropriate option?

Any of the splines operate on projected 2-D coordinates. I have updated the docs to make that clear and ordered an article on spherical bezier splines to see if we might be able to add that. For now, the green line is affected by where the projected points are in 2-D.