Skip to content

Clipping seems not working with gmt text -G+n when text position is assigned using -F+c[justify] #8929

@mkononets

Description

@mkononets

Clipping seems not working with gmt text -G+n when text position is assigned using -F+c[justify]

gmt begin text-clipping png
  gmt plot -T -R0/1/0/1 -JX5c
  gmt text -F+f10p,Helvetica+cMC+jMC+t'Test text' -G+n -C20%+tO -N
  gmt basemap -BWStr -Bxafg -Byafg
  gmt clip -C
  gmt text -F+f10p,Helvetica+cMC+jMC+t'Test text' -Gred@90 -C20%+tO
gmt end show
Image

Providing coordinates on the input enables clipping, that is, the gridlines behind the text label got clipped, see below.

gmt begin text-clipping png
  gmt plot -T -R0/1/0/1 -JX5c
  echo 0.5 0.5 | gmt text -F+f10p,Helvetica+jMC+t'Test text' -G+n -C20%+tO -N
  gmt basemap -BWStr -Bxafg -Byafg
  gmt clip -C
  gmt text -F+f10p,Helvetica+cMC+jMC+t'Test text' -Gred@90 -C20%+tO
gmt end show
Image

gmt 6.6.0 on linux, same with versions 6.5.0 and 6.3.0 FWIW.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions