SV: [GRASS-user] vlegend

Hamish hamish_b at
Thu Mar 3 05:50:59 EST 2011

Martin Album Ytre-Eide wrote:
> I started making my own legend, but I
> can't seem to make one with pattern :( The rectangle
> function does not accept a pat command. Any workaround or
> ideas?

one idea: try adding clone vareas, but with smaller pwidth and
an impossible SQL where clause so nothing is ever drawn to the
map. Then use those mini-patterns in the vlegend. 
Use 'lpos 0' for the real areas so that they don't get added
to the legend.

if you are comfortable tweaking and recompiling C code there are
other options...

Index: ps/
--- ps/      (revision 45422)
+++ ps/      (working copy)
@@ -204,7 +204,7 @@
                            fprintf(PS.fp, "        %f %f scale\n", sc, sc);
                            fprintf(PS.fp, "        %.8f W\n",
-                                   vector.layer[i].pwidth);
+                                   vector.layer[i].pwidth * 0.8);
                            fprintf(PS.fp, "        %s\n", pat);
                            fprintf(PS.fp, "        end\n");
                            fprintf(PS.fp, "      } bind\n>>\n");



More information about the grass-user mailing list