[GRASS-dev] [GRASS GIS] #3014: Add ticks to continuous raster legend

GRASS GIS trac at osgeo.org
Sun Jun 12 07:00:13 PDT 2016


#3014: Add ticks to continuous raster legend
--------------------------+---------------------------------------------
  Reporter:  annakrat     |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.3.0
 Component:  Display      |    Version:  svn-trunk
Resolution:               |   Keywords:  d.legend, gsoc2016, cartography
       CPU:  Unspecified  |   Platform:  All
--------------------------+---------------------------------------------

Comment (by lazaa):

 Replying to [comment:4 annakrat]:
 > Thanks, I tested it and it works very well. I have couple of
 suggestions:
 >
 > * if you compare the default before and after this change, the white
 border is now transparent, so that should be changed back. Also if you
 test categorical data, the black/white border is switched (inner is black,
 should be white). The current default legend size is wider than the
 previous one, that should be fixed as well.
 It's fixed, it should be the same like before.

 > * drawing ticks should be optional, implement for example '-t' flag.
 Question is if it should draw the ticks by default or not. Let's switch
 them off by default for now.
 {{{-t}}} option added. By default ticks are switched off.

 > * the vertical centering of the labels and ticks is not quite perfect, I
 wonder if it could be improved

 It's the same problem with fonts like in d.grid. Centering works fine for
 default GRASS_FONT. The problem is there's a constant which define the
 width/height ratio of a letter.

 > * I thought more about the names of the new parameters and decided
 `label_values` and `label_step` would fit more to `labelnum`

 I changed both option names.
 > * the `-c` flag should always hide all the numbers, it is actually
 useful mostly with categorical data

 {{{-c}}} flag now hide all labels. {{{G_option_exclusive}}} is used so
 user can't use {{{c}}} flag with {{{label_value}}} or {{{label_step}}}
 option.

 > * I think when option `label_value` or `label_step` is used, `labelnum`
 should be ignored. So the min max values won't be displayed. I hope we
 could get some feedback from other users what kind of behavior would be
 more natural.
 I add {{{G_option_exclusive}}} but please test it if everything is OK.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3014#comment:5>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list