#3081: Add text after labels in d.legend
-----------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 7.3.0
Component: Display | Version: unspecified
Keywords: d.legend, cartography | CPU: Unspecified
Platform: Unspecified |
-----------------------------------+-------------------------
Now G7:d.legend can show only the numbers for a given values and it looks
like this:
{{{
| | 150
| | 100
| | 50
| | 0
}}}
I would like to attach a unit to each number, i.e. show the value and its
units, something like this:
{{{
| | 150 m
| | 100 m
| | 50 m
| | 0 m
}}}
The unit can/could be taken from raster map units (i.e. what G7:r.info
gives) but I need to specify units manually because the unit is not always
written in the metadata or it it not in the right form. Examples include
degrees (deg, °) and percents (percentages, %).
The question is how to deal with the space between the number and the text
(unit). Different languages (and fields) has different standards, so there
should be probably a flag which would do it or the spaces would be just
provided as part of the label (which might be less clear especially in the
command line).
This applies just to continuous data but I don't see a reason to somehow
disable this behavior for categorical legends.
#3081: Add text after labels in d.legend
--------------------------+-----------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend, cartography
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------
Comment (by lazaa):
We could add option {{{units}}} which would display unit after every label
or maybe just under the legend for all labels? It seems to me more user
friendly by default display units with whitespace after label and for
cases of degrees or percentages add a new flag.
#3081: Add text after labels in d.legend
--------------------------+-----------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: minor | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend, cartography
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------
Changes (by wenzeslaus):
* type: defect => enhancement
Comment:
Replying to [comment:1 lazaa]:
> We could add option {{{units}}} which would display unit after every
label
This is what I mean. `units` sounds good.
> or maybe just under the legend for all labels?
The feature of adding it there for all was already there (I'm not sure
about the current situation). When the raster had units set (G7:r.info
gives those), they would be show where the title currently is displayed.
This still makes sense but it is more discussion about the title I think.
> It seems to me more user friendly by default display units with
whitespace after label and for cases of degrees or percentages add a new
flag.
Agreed. Space by default might lead to better results in most cases. Flag
for disabling solves the rest (when people need no space).
#3081: Add text after labels in d.legend
--------------------------+-----------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: minor | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend, cartography
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------------
Comment (by lazaa):
Replying to [comment:2 wenzeslaus]:
> Replying to [comment:1 lazaa]:
> > We could add option {{{units}}} which would display unit after every
label
>
> This is what I mean. `units` sounds good.
>
> > or maybe just under the legend for all labels?
>
> The feature of adding it there for all was already there (I'm not sure
about the current situation). When the raster had units set (G7:r.info
gives those), they would be show where the title currently is displayed.
This still makes sense but it is more discussion about the title I think.
The feature is still there. Units are displayed under the legend if r.info
gives those and no title is set (this should be probably changed so both
units and title could be displayed at the same time if defined).
>
> > It seems to me more user friendly by default display units with
whitespace after label and for cases of degrees or percentages add a new
flag.
>
> Agreed. Space by default might lead to better results in most cases.
Flag for disabling solves the rest (when people need no space).