# How to make legend

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-make-legend/1232>\
**Category:** Q&A\
**Created:** [January 21, 2021, 6:08am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-legend/1232 "2021-01-21T06:08:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraneBoba](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@CraneBoba](https://forum.generic-mapping-tools.org/u/CraneBoba)\
**Post date:** [January 21, 2021, 6:08am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-legend/1232/1 "2021-01-21T06:08:59Z")

</div>

I have following script

```auto
gmt begin map
  gmt basemap -R25.5/45.5/34.5/42.5 -JM6i -U -B >> map
  gmt plot eth.csv -R25.5/45.5/34.5/42.5 -JM6i -Sc0.05 -G50 -L -V -B >> map
 gmt plot blst.csv -R25.5/45.5/34.5/42.5 -JM6i -Sc0.1 -G0/0/255 -L -V -B >> map
 gmt plot promblast.csv -R25.5/45.5/34.5/42.5 -JM6i -Ss0.2 -G128/9/0 -L -V -B >> map
gmt end show

```

How to place legend under ( not on) this map ?  
In the legend I wish near each type of symbol on the map  
to have texts like this- 1, -2. ?  
Is it possible to place few symbols on the one string?  
Let say in the first string -Sc0.05 -G50 “-1”, -Sc0.1 -G0/0/255 “-2”  
and on the next string -Ss0.2 -G128/9/0 “-3”

---

<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:** [February 2, 2021, 8:57am UTC](https://forum.generic-mapping-tools.org/t/how-to-make-legend/1232/2 "2021-02-02T08:57:30Z")

</div>

I just tested a work around, so my suggestion is

1. use -l"-1" etc. in each plot command to prepare the legend. The meaning of -L I don’t know. The “\>\> map” you don’t need in modern style of gmt6.1. Then add the legend command:  
gmt legend -Dx0c/-2c+jTL+o0.5 -Fi+gwhite+pthick  
to place the legend 2 cm below the plot with the box oriented 0.5 cm away from that point identified as top/left corner. See also Example 3 in the galery.
