# Font change in plot -l string not correctly intpreted in legend command

**URL:** <https://forum.generic-mapping-tools.org/t/font-change-in-plot-l-string-not-correctly-intpreted-in-legend-command/3989>\
**Category:** Q&A\
**Tags:** legend\
**Created:** [June 2, 2023, 4:02pm UTC](https://forum.generic-mapping-tools.org/t/font-change-in-plot-l-string-not-correctly-intpreted-in-legend-command/3989 "2023-06-02T16:02:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![volkerk](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@volkerk](https://forum.generic-mapping-tools.org/u/volkerk)\
**Post date:** [June 2, 2023, 4:02pm UTC](https://forum.generic-mapping-tools.org/t/font-change-in-plot-l-string-not-correctly-intpreted-in-legend-command/3989/1 "2023-06-02T16:02:02Z")

</div>

Using gmt 6.4 I came across the problem that the font change in the first legend string was not correct

```bash
# generate legend
rm -f legend.txt
cat <<- END > dummy.dat
-128 -9000
0 -9000
END

gmt begin a
   gmt basemap -JX7/5 "-R0/1/0/1" -Bewsn
   gmt plot dummy.dat -Wthick -l'@%1%m@%% (rot. feedb.)'
   gmt plot dummy.dat -Wthick,blue -l'@%1%m@%% (rot. pot. only)'
   gmt plot dummy.dat -Wthin -l'm@-x@-'
   gmt plot dummy.dat -Wthin,- -l'm@-y@-'
   gmt plot dummy.dat -Wthin,. -l'm@-z@-'
   gmt legend -DjTR+o0.2c -F+gwhite --FONT_ANNOT_PRIMARY=8p,Helvetica -Tlegend.txt
   # modificiation due to bug in legend function.
gmt end show

```

resulted in a not correct setting of the legend. I echoed the legend entries to legend,txt and they read,

```auto
S - - - - thick,black - @%m@% (rot. feedb.)
S - - - - thick,blue - @%1%m@%% (rot. pot. only)
S - - - - thin,black - m@-x@-
S - - - - thin,black,6_3:0p - m@-y@-
S - - - - thin,black,0.75_3:0p - m@-z@-

```

So only in the first line `@%1%m@%%` was changed to `@%m@%`. (I want to set the m in bold)  
The dummy I did to use the legend information later in a different plot.
