Opened 16 years ago
Last modified 6 years ago
#487 new enhancement
ps.map: legend
Reported by: | hamish | Owned by: | hamish |
---|---|---|---|
Priority: | minor | Milestone: | 7.6.2 |
Component: | Ps.map | Version: | svn-trunk |
Keywords: | legend | Cc: | ejtizado@…, grass-dev@… |
CPU: | All | Platform: | All |
Description
Jorge wrote to grass-dev on 7 Feb 2009:
http://thread.gmane.org/gmane.comp.gis.grass.devel/31538 http://thread.gmane.org/gmane.comp.gis.grass.devel/31577
> vlegend > where -100 0 --> future 100% 0% > ref right lower > font Monaco > fontsize 8 > border 1 > color black > fcolor white > end
The main change of my custom ps.map is to add a legend.h and legend.c to manage the cosmetic rules of legend (vlegend and rlegend, it is colortable [float or not]) with the rules: where, ref, offset, border, color, fcolor, font, fontsize, fontcolor, cols (and span), margin and width (of the symbol).
Span is included with cols and negative values permit extend the legend over the width of the map (-1 same width that the map, -0.5 the 50% of the width and so)
Moreover, I want traslate more responsabilities of drawing to postscript (the C code is reduced and the relative size of ps file); and to exploit the resources of postscript drawing. Then re-write many part of vlegend, and new rlegend as substitute of the files ps_clrtbl and ps_fclrtbl (but with same parts of code as nice step and ordination of vectors to mantain same final aspect of the map).
Also I try to all 'color' rules use named, RGB or none.
Well, three images with my custom ps.map in action:
vlegend.jpg is obtained with ...
vlegend where 0% 0% -> now use percent (or absolute inches, of course) ref left upper -> reference point offset 0 -2 -> x and y offset in points font Monaco fontsize 8 fontcolor black -> new margin 4 -> inner margin border 2 -> width of outer border (<0 no border) color black -> color of border (named, RGB or none) fcolor 240:240:240 -> background color of vlegend (named, RGB or none) cols 2 -0.5 -> cols and span in inches (<0 auto, here 50% width of map) end
rlegend.jpg is obtained with ...
rlegend y raster $RASTER where 0% 100% -> use percent or... ref left upper -> reference point offset 0 0 -> x and y offset border 2 color indigo fcolor white font Monaco fontsize 8 fontcolor black width 0.25 height 3 tickbar y end
rlegend2.jpg is a not float colortable :)
thanks, Jorge
--
- Jorge Tizado
Attachments (5)
Change History (15)
by , 16 years ago
Attachment: | rlegend.jpg added |
---|
by , 16 years ago
Attachment: | ps_vlegend.c.diff added |
---|
comment:1 by , 16 years ago
Cc: | added |
---|
Hi,
just a reminder -- patches need to fully conform to the SUBMITTING rules in the source code before they can be considered.
also, bite sized chunks are easier for us to digest. (ie 1 new feature set per patch please)
thanks, Hamish
comment:2 by , 15 years ago
Cc: | added |
---|
comment:3 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:4 by , 8 years ago
Milestone: | 7.0.5 → 7.3.0 |
---|
comment:7 by , 7 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:8 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
new FP raster legend