---
name: "legend"
section: "1"
platform: "linux"
package: "mapserver-bin"
version: "8.4.0-4+deb13u2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/legend"
---

# legend(1)

create a legend image from a mapfile

## NAME

legend - create a legend image from a mapfile

## SYNOPSIS

FC**legend**F\[0\]  \[*mapfile* *outputimage*  \| FC**-v**F\[0\]\]

## DESCRIPTION

**legend** creates a legend image from a mapfile. Output format depends on the graphics library used for rendering.

## OPTIONS

- *mapfile*

  Path to the mapfile.

- *outputimage*

  Path to the output image file.

- FC**-v**F\[0\]

  Display mapserver version and build options.

## SEE ALSO

[**scalebar**(1)](/scalebar/1.md)
