pslegend textfile -D[x]lon/lat/width/height/just -Jparameters -Rwest/east/south/north[r] [ -Cdx/dy ] [ -F ] [ -Gfill ] [ -K ] [ -Lspacing ] [ -O ] [ -P ] [ -S[script] ] [ -U[/dx/dy/][label] ] [ -V ] [ -Xx-shift ] [ -Yy-shift ] pslegend will make legends that can be overlaid on maps. It reads specific legend-related information from an input file [or stdin]. Because all the elements of the legend can already be created with other tools (psxy, pstext) we use those tools by creating a batch job of commands that are executed to make the final PostScript overlay. Because of this process, the option exists to just output the script which can then be fine-tuned manually. To add an example of a legend to a Mercator plot (map.ps) with the given specifications, use pslegend -R -JM -O -G255 <,<, EOF >,>, map.ps # Legend test for pslegend # G is vertical gap, V is vertical line, N sets # of columns, D draws horizontal line. # H is header, L is label, S is symbol, >, & T is paragraph text # G -0.15i H 24 Times-Roman My Map Legend G 0.05i D 0.2i 1p N 2 V 0 1p S 0.1i c 0.15i p300/12 0.25p 0.3i This circle is hachured S 0.1i t 0.15i 255/255/0 0.25p 0.3i This triangle is yellow S 0.1i h 0.15i 0/255/0 0.25p 0.3i This hexagon is green S 0.1i d 0.15i 0/0/255 0.25p 0.3i This diamond is blue S 0.1i – 0.15i – 0.25tap 0.3i A contour V 0 1p D 0.2i 1p M 5 5 500:km:u f I SOEST_logo.ras 3 CT L 9 4 R Smith et al., @%5%J. Geophys. Res., 99@%%, 2000 G 0.15i >, T Let us just try some simple text that can go on a few lines. T There is no easy way to predetermine how many lines will be required, T so we may need to adjust the box height to get the right size. Source.