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

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-text-is-there-a-way-to-get-text-labels-plotted-if-anchor-points-are-inside-the-plotted-range/6219>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [October 5, 2025, 10:52pm UTC](https://forum.generic-mapping-tools.org/t/gmt-text-is-there-a-way-to-get-text-labels-plotted-if-anchor-points-are-inside-the-plotted-range/6219 "2025-10-05T22:52:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [October 5, 2025, 10:52pm UTC](https://forum.generic-mapping-tools.org/t/gmt-text-is-there-a-way-to-get-text-labels-plotted-if-anchor-points-are-inside-the-plotted-range/6219/1 "2025-10-05T22:52:10Z")

</div>

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`:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [October 5, 2025, 11:20pm UTC](https://forum.generic-mapping-tools.org/t/gmt-text-is-there-a-way-to-get-text-labels-plotted-if-anchor-points-are-inside-the-plotted-range/6219/2 "2025-10-05T23:20:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [October 5, 2025, 11:29pm UTC](https://forum.generic-mapping-tools.org/t/gmt-text-is-there-a-way-to-get-text-labels-plotted-if-anchor-points-are-inside-the-plotted-range/6219/3 "2025-10-05T23:29:09Z")

</div>

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