Gmt text, is there a way to get text labels plotted if anchor points are inside the plotted range?

Hi,

I am trying to plot labels for my data points on a Cartesian 2D plot. The labels are plotted with a small offset like below, using +F...+jBR -Dj3p:

gmt text data.txt -F+f6p,Helvetica-Oblique+jBR -Dj3p

Labels falling outside the plot area get cropped. I want the labels to be plotted - as long as the corresponding datapoint is inside the plot area, even if the label is not. Is this possible?

-N does not help much as sometimes there are datapoints on the dataset that are far outside the plot area, and I don’t want those neither plotted nor labeled.

I’m not aware of such possibility. By default all plots set a clip path defined by the the map limits and -N prevents that clipping path to be set. But you can filter the points with gmtselect -R and then -N in the pstext command.

Thank you! gmt select -R did exactly what I wanted.